Advertisement
Guest User

Untitled

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