Math, asked by rakibsuvro19, 9 months ago

Write a C program that will calculate the total scholarship amount of a student based on the marks obtained by him or her in the first semester of the university. Note that a student must take 3 courses in the first semester i.e. Physics, Math, Programming. Your program should take input the marks obtained by the student in all the 3 courses and then calculate and display the total scholarship amount based on the following conditions:
If the student gets more than 84 in Physics then s/he will get 4000 Taka as scholarship. Also if the student gets more than 89 in Math then s/he will get 5000 Taka as scholarship. Again if the student gets more than 95 in Programming then s/he will get 7000 Taka as scholarship.

answer c programming code.?

Answers

Answered by MRNOTNERDY
2

Answer:

Well I don't understand Computer that much

Step-by-step explanation:

.

Answered by mririfat20
0

Answer:

include <stdio.h>

int main()

{

int phy, chem, bio, math, comp;

float per;

/* Input marks of five subjects from user */

printf("Enter five subjects marks: ");

scanf("%d%d%d%d%d", &phy, &chem, &bio, &math, &comp);

/* Calculate percentage */

per = (phy + chem + bio + math + comp) / 5.0;

printf("Percentage = %.2f\n", per);

/* Find grade according to the percentage */

if(per >= 90)

{

printf("Grade A");

}

else if(per >= 80)

{

printf("Grade B");

}

else if(per >= 70)

{

printf("Grade C");

}

else if(per >= 60)

{

printf("Grade D");

}

else if(per >= 40)

{

printf("Grade E");

}

else

{

printf("Grade F");

}

return 0;

}

Note: %.2f is used

Similar questions