Advertisement
Guest User

Scholarship

a guest
Jun 18th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     double salary, grades, minSalary;
  9.     cin >> salary >> grades >> minSalary;
  10.     cout.setf(ios::fixed);
  11.     cout.precision(0);
  12.     if(grades >= 4.5 && salary < minSalary)
  13.     {
  14.         if(salary < minSalary && grades < 5.5)
  15.          {
  16.              double scholarship = grades * 25;
  17.              cout << "You get a scholarship for excellent results " << scholarship << " BGN" << endl;
  18.  
  19.          }
  20.          double socialScholarship = minSalary * 0.35;
  21.          cout << "You get a Social scholarship " << socialScholarship << " BGN" << endl;
  22.     }
  23.     else
  24.     {
  25.         cout << "You cannot get a scholarship!" << endl;
  26.     }
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement