MartinPaunov

Scolarship

Sep 14th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main(){
  4.  
  5.     double income, grade, minimumSalary;
  6.  
  7.     std::cin >> income >> grade >> minimumSalary;
  8.  
  9.     if(grade <= 4.5 || (grade >= 4.5 && grade < 5.5 && income > minimumSalary)) {
  10.         std::cout << "You cannot get a scholarship!" << std::endl;
  11.     }else{
  12.  
  13.         double social = minimumSalary * 0.35;
  14.         double ace = grade * 25;
  15.  
  16.         if(grade < 5.5){
  17.             std::cout << "You get a Social scholarship " << static_cast<int>(social) << " BGN" << std::endl;
  18.         }else if(social > ace && income < minimumSalary){
  19.             std::cout << "You get a Social scholarship " << static_cast<int>(social) << " BGN" << std::endl;
  20.         }else{
  21.             std::cout << "You get a scholarship for excellent results " << static_cast<int>(ace) << " BGN" << std::endl;
  22.         }
  23.     }
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment