I am looking to write the following selection statement to display “Overpriced” if the value of price is greater than .99 and “Acceptable” if the value of price is less than or equal to.99.
Can someone please help me out
Thanks
Printable View
I am looking to write the following selection statement to display “Overpriced” if the value of price is greater than .99 and “Acceptable” if the value of price is less than or equal to.99.
Can someone please help me out
Thanks
What have you done so far ?
Wow. I haven't written such skillfull code for a long time!Code:float price;
price=GetPriceSomeHow();
if (price>.99)
cout << "Overpriced" << endl;
else
cout << "Acceptable" << endl;
EDIT: Ints dont have decimal points:D