So here it is I am learning C++ from scratch, things seemed to go alright till now but now i have decided to use Boolean function to check user input and its not working as it should can someone please check the code below and reply.
Thanks in advance
-->> Function prototype
bool check(double);
-->> Code in main
for(i=0;i<size;i++)
{
double temp=0;
cout<<"Please enter sales for "<< month[i]<< ":- ";
cin>>sales[i];
while (check(sales[i]))
{
cout<< "Invalid inpit. Please enter again:- ";
cin>>sales[i];
}
}