Advertisement
Spocoman

Scholarship

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