Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- using namespace std;
- int main()
- {
- double income, gpa, minWage;
- cin >> income >> gpa >> minWage;
- //cin >> gpa;
- //cin >> minWage;
- double scholarshipSoc = floor(0.35 * minWage);
- double scholarshipExc = floor(25 * gpa);
- if (income > minWage && gpa < 5.5)
- {
- cout << "You cannot get a scholarship!";
- }
- else if (income < minWage && gpa < 4.5)
- {
- cout << "You cannot get a scholarship!";
- }
- else if (income < minWage && gpa >= 4.5 && gpa < 5.5)
- {
- cout << "You get a Social scholarship " << scholarshipSoc << " BGN";
- }
- else if (gpa >= 5.5)
- {
- cout << "You get a scholarship for excellent results " << scholarshipExc << " BGN";
- }
- else if (scholarshipExc >= scholarshipSoc)
- {
- cout << "You get a scholarship for excellent results " << scholarshipExc << " BGN";
- }
- else if (scholarshipExc < scholarshipSoc)
- {
- cout << "You get a Social scholarship " << scholarshipSoc << " BGN";
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment