Below is the program for showning biggest no out three numbers and aslo the grade of the number
grade "a" is 80% "b" is 65-79% "c" is 50-64%
now the problem is for example we write three numbers
1st is 60 and second is 87 and third is 92 then it shows biggest number c but shows the grade of 1st no "c"
now tell me what is prblem in the program that it always show the grade of the first number.
plzz replay faster as tomorrow is my sister class and the teacher will check the program.
Thanks in anticipation.
# include <stdio.h>
# include <conio.h>
void main()
{
clrscr();
int x,m2,m3;
printf("enter the marks of your three subjects!");
scanf("%d %d %d",&x,&m2,&m3);
{
if (x<m2&&m2>m3)
printf("max = m2");
else
if (x<m3)
printf("max = m3");
else
printf("max = m1");
} {
if(x>=80)
printf("a");
else if (x>=65)
printf("b");
else if (x>=50)
printf("c");
}
getch();
}
Bookmarks