{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lee_assig12 - b=b 1 if(value>=800.01 c=c 1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 //Cheu Lee Assig12 #include<iostream> #include<cmath> using namespace std int main() { double a=0, b=0, c=0, value=0 cout<<"This program will keep track of the number of customers according to spending."<<endl while (value!=-1){ cout<<"Enter the money spent (-1 to end): " cin>>value if (value>=0 && value<=200){ a=a+1 } if (value>=200.01 && value<=800){
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b=b+1 } if (value>=800.01){ c=c+1 } } cout<<"The number of customers who spent between 0 and 200 dollars is: "<<a<<endl cout<<"The number of customers who spent between 200.01 and 800 dollars is: "<<b<<endl cout<<"The number of customers who spent 800.01 or more is: "<<c<<endl return 0 }...
View Full Document

{[ snackBarMessage ]}