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
1
Expert's answer
2013-02-19T09:00:51-0500
# 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; }
Comments
Leave a comment