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
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 ?
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
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
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials