Hi guys i need help for checking my program. I made a program in c++ but i'm not sure if this is correct.
cout<<"Please Enter your account no.: "; cin>>x; cout<<endl; cout<<endl; cout<<"*****Costumer Type*****\n"; cout<<endl; cout<<" R - Residential\n"; cout<<" B - Business\n"; cout<<" C - Exit\n"; cout<<endl; cout<<endl; cout<<"Please Enter your choice: "; cin>>choice; cout<<endl; cout<<endl; switch (toupper(choice)) { case 'R': cout<<"***Following rates***\n"; cout<<endl; cout<<endl; cout<<"Bill processing fee: $4.50\n"; cout<<"Basic service fee: $20.50\n"; cout<<"Premium channels: $7.50 per channel"; cout<<endl; cout<<endl; cout<<"Please Enter the number of premium channels subcribed: "; cin>>y; cout<<endl; cout<<endl; cout<<"Your bill is: " <<7.50* y+ 4.50 + 20.50<< " dollars "<<endl;break; case 'B': cout<<"***Following rates***\n"; cout<<endl; cout<<endl; cout<<"Bill processing fee: $15.00\n"; cout<<"Basic service fee: $7.50 for the first 10 connection\n"; cout<<"Premium channels: $50.00 per channel\n"; cout<<"Additional connection: $5.00 each\n"; cout<<endl; cout<<"Please Enter the number of premium channels subcribed: "; cin>>y; cout<<endl; cout<<endl; if (y < 11) { cout<<"Your bill is: " << 50.00* y + 15.00 + 7.50<< " dollars "<<endl;break; } else { if ( y > 10) { cout<<"Your bill is: " << y*50.00 + 15.00 + 7.50 +5.00<< " dollars "<<endl; } else return 0; break; } case 'C': cout<<"GOODBYE!\n";break; default: cout<<"INVALID INPUT!\n";break; } system("pause"); return 0; }
\[\newcommand{\avec}[1]\]
Well, what exactly is your program suppose to do? I know what your code is doing but what did your instructor tell you to create and what is the output suppose to look like. Right now the program you have can be improved dramatically but you are starting off great
\[\newcommand\{\alpheqn\}\{\setcounter{saveeqn}\}\{\value{equation}\}%\]
moha???
yeah
What are you trying to put up there? Looks like messed up latex lol
yeah i'm just training some :)
To use latex use \ [ latex goes here \ ]
okay but how i can write mix of combination of mathmatics
\ [ \frac{-b \pm \sqrt{b^2-4ac}}{2a} \ ] Will give you the Quadratic Formula \[ \frac{-b \pm \sqrt{b^2-4ac}}{2a} \] Also click on the Equation button next to draw and attach files
thx alot
pm it's +_ right???
Yes \pm is +-
If you want to make things inline with your sentence like this \( \frac{2}{4} \) you would use the \ ( \)
thx and what about dx
and integration
its a bill inquiry.
Join our real-time social learning platform and learn together with your friends!