60 397
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #24618 in C++ for aron

Question #24618
hi pls help.make a program that would compute the total tuition fee of a student,using the following data.
input:tuition fee/cash/two payments/three payments
output:total_tuition_fee
sample output:enter name of student/enter initial tuition fee/enter mode of pymnts/(1)cash-10%discount/(2)two pymnts-5% interest/(3)three pymnts-10%interest
Expert's answer
# include <iostream>
# include <string >

using namespace std;


int main(){
cout<<"enter name of student:";
string name;
double d=0;
int i;
getline(cin,name,'\n');
cout<<"enter initial tuition fee:";
cin>>d;
cout<<"enter mode of pymnts";
cin>>i;
cout<<"For student "<<name<<" : ";
switch (i){
case 1: cout<<0.9*d;break;
case 2: cout<<0.95*2*d;break;
case 3: cout<<0.9*3*d;break;
}
system("PAUSE");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions