Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float profit = 0;
- float averageGrade = 0;
- float minSalary = 0;
- scanf_s("%f", &profit);
- scanf_s("%f", &averageGrade);
- scanf_s("%f", &minSalary);
- float social = minSalary * 0.35;
- float execellent = averageGrade * 25;
- if (profit<minSalary && averageGrade >= 5.5)
- {
- if (social > execellent)
- {
- printf_s("You get a Social scholarship %.2f BGN", social);
- }
- else
- {
- printf_s("You get a scholarship for excellent results %.2f BGN", execellent);
- }
- }
- else if (profit < minSalary && averageGrade>4.5)
- {
- printf_s("You get a Social scholarship %.2f BGN", social);
- }
- else if (averageGrade >= 5.5)
- {
- printf_s("You get a scholarship for excellent results %.2f BGN", execellent);
- }
- else
- {
- printf_s("You cannot get a scholarship!\n");
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement