Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- double salary, average_score, min_salary;
- double social_scholarship_size = 0;
- double excellent_scholarship_size = 0;
- bool gotten_Scholarship = false;
- cin >> salary >> average_score >> min_salary;
- if (average_score >= 5.5)
- {
- excellent_scholarship_size = average_score * 25;
- gotten_Scholarship = true;
- }
- if (average_score >= 4.5 && salary < min_salary)
- {
- social_scholarship_size = min_salary * 0.35;
- gotten_Scholarship = true;
- }
- if (gotten_Scholarship)
- {
- if (social_scholarship_size > excellent_scholarship_size)
- {
- cout << "You get a Social scholarship " << floor(social_scholarship_size) << " BGN" << endl;
- }
- else
- {
- cout << "You get a scholarship for excellent results " << floor(excellent_scholarship_size) << " BGN";
- }
- }
- else
- {
- cout << "You cannot get a scholarship!" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement