Guest User

Untitled

a guest
Aug 3rd, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cmath>
  4.  
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11. double income, gpa, minWage;
  12. cin >> income >> gpa >> minWage;
  13. //cin >> gpa;
  14. //cin >> minWage;
  15.  
  16.  
  17. double scholarshipSoc = floor(0.35 * minWage);
  18. double scholarshipExc = floor(25 * gpa);
  19.  
  20. if (income > minWage && gpa < 5.5)
  21. {
  22. cout << "You cannot get a scholarship!";
  23. }
  24. else if (income < minWage && gpa < 4.5)
  25. {
  26. cout << "You cannot get a scholarship!";
  27. }
  28. else if (income < minWage && gpa >= 4.5 && gpa < 5.5)
  29. {
  30. cout << "You get a Social scholarship " << scholarshipSoc << " BGN";
  31. }
  32. else if (gpa >= 5.5)
  33. {
  34. cout << "You get a scholarship for excellent results " << scholarshipExc << " BGN";
  35. }
  36. else if (scholarshipExc >= scholarshipSoc)
  37. {
  38. cout << "You get a scholarship for excellent results " << scholarshipExc << " BGN";
  39. }
  40. else if (scholarshipExc < scholarshipSoc)
  41. {
  42. cout << "You get a Social scholarship " << scholarshipSoc << " BGN";
  43. }
  44.  
  45.  
  46.  
  47. return 0;
  48. }
Add Comment
Please, Sign In to add comment