fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. float due,credit,waiver,retake,credit_fee,a,retake_fee,extra_fee,b,aft_wa_credit_fee1,tot,mid,x,extra_waiver;
  6.  
  7. float c,gpa_discount,actual_credit_fee;
  8. cout<<"Your previous due(if no due press 0):";
  9. cin>>due;
  10. cout<<"Your credit (Without retake credit):";
  11. cin>>credit;
  12. cout<<"Your waiver(type only int,not %):";
  13. cin>>waiver;
  14. cout<<"Caution if your previous semester GPA is 3.80+ you will get 5% extra waiver"<<endl;
  15. cout<<"Caution if your previous semester GPA is 4 you will get 10% extra waiver"<<endl;
  16. cout<<"your extra waiver(if no type 0):";
  17. cin>>extra_waiver;
  18. cout<<"Your total retake course credit(if no retake then press 0):";
  19. cin>>retake;
  20. cout<<"Extra any exclusive course fee(if no type 0):";
  21. cin>>extra_fee;
  22. cout<<endl<<endl<<endl;
  23.  
  24. retake_fee=retake*2800;
  25. credit_fee=credit*2800;
  26. a=100-waiver;
  27. b=a/100;
  28. aft_wa_credit_fee1=credit_fee*b;
  29. c=extra_waiver/100;
  30. gpa_discount=c*aft_wa_credit_fee1;
  31. actual_credit_fee=aft_wa_credit_fee1-gpa_discount;
  32.  
  33. tot=due+actual_credit_fee+5100+retake_fee+extra_fee;
  34.  
  35. cout<<"_____________________________"<<endl;
  36. cout<<"Your total bill is:"<<tot<<endl;
  37. cout<<"Bill History:"<<endl<<"Previous Due:"<<due<<endl<<"Credit Fee:"<<actual_credit_fee<<endl;
  38. cout<<"Retake fee:"<<retake_fee<<endl<<"Registration_fee:4000"<<endl<<"IT & Library fee:1000"<<endl;
  39. cout<<"Extra course fee:"<<extra_fee<<endl<<"Club Fee:100"<<endl;
  40. cout<<"_____________________________"<<endl;
  41. cout<<"You have to pay 11,100 before starting semester"<<endl;
  42. x=tot-11100;
  43. mid=x/2;
  44. cout<<"Before MID you have to pay:"<<mid<<endl;
  45. cout<<"Before FInal you have to pay:"<<mid<<endl;
  46. return 0;
  47. }
Success #stdin #stdout 0.01s 5464KB
stdin
Standard input is empty
stdout
Your previous due(if no due press 0):Your credit (Without retake credit):Your waiver(type only int,not %):Caution if your previous semester GPA is 3.80+ you will get 5% extra waiver
Caution if your previous semester GPA is 4 you will get 10% extra waiver
your extra waiver(if no type 0):Your total retake course credit(if no retake then press 0):Extra any exclusive course fee(if no type 0):


_____________________________
Your total bill is:5100
Bill History:
Previous Due:-3.31592e-12
Credit Fee:8.64691e-38
Retake fee:8.64691e-38
Registration_fee:4000
IT & Library fee:1000
Extra course fee:-2.39845e-11
Club Fee:100
_____________________________
You have to pay 11,100 before starting semester
Before MID you have to pay:-3000
Before FInal you have to pay:-3000