Advertisement
JOHNYTHEWINNER

Scholarship

Jan 24th, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. # include <iostream>
  2. using namespace std;
  3. #include <iomanip>
  4. #include <math.h>
  5.  
  6.  
  7. int main()
  8. {
  9.     double income;
  10.     double success;
  11.     double salary;
  12.  
  13.     cin >> income;
  14.     cin >> success;
  15.     cin >> salary;
  16.  
  17.     double social = salary * 0.35;
  18.     double excellent = success * 25;
  19.  
  20.  
  21.     if (success >= 5.50)
  22.     {
  23.         if (excellent >= social || income > salary)
  24.         {
  25.             cout << "You get a scholarship for excellent results " << floor(excellent) << " BGN" << endl;
  26.  
  27.         }
  28.         else
  29.         {
  30.             cout << "You get a Social scholarship " << floor(social) << " BGN" << endl;
  31.         }
  32.     }
  33.     else if (income < salary && success > 4.50)
  34.     {
  35.         cout << "You get a Social scholarship " << floor(social) << " BGN" << endl;
  36.     }
  37.  
  38.     else
  39.     {
  40.         cout << "You cannot get a scholarship!" << endl;
  41.     }
  42.     return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement