The function Generate_And_Display_Bill() has no formal parameters and returns a variable of type float. The function generates a random number between $0.01 and $99.99 and returns the value to main().
This is what I've created so far in my function declaration;
#include <iostream>
#include <ctime>
float Generate_And_Display_Bill()
{
float Random_Bill;
srand(time(NULL));
for(float index=0.01; index < 99.99; index++)
{
Random_Bill = (rand()%99.99)+1;
cout << Random_Bill << endl;
}
return (Random_Bill);
}
I'm receiving an error telling me that in line 14 the 99.99 must be have integral or enum type, I want to display a random bill with decimals and I've declared Random_Bill as a float, what am I doing wrong?
Also for some odd reason "cout" and "endl" are giving me unidentified error messages even though I have included the iostream library, please help