This program is used to find out Grade and GPA based on obtained marks in Examination. Valid up to H.S.C Exam.
# include <stdio.h>
int main()
{
int marks;
printf("Please enter your marks: ");
scanf("%d", &marks);
if (marks <=32) {printf("\nYour Grade is F and GPA is 0\n");
}
else if (marks <=39) {printf("\n\nYour Grade is D and GPA is 1\n");
}
else if (marks <=49) {printf("\nYour Grade is C and GPA is 2\n");
}
else if (marks <=59) {printf("\nYour Grade is B and GPA is 3\n");
}
else if (marks <=69) {printf("\nYour Grade is A- and GPA is 3.5\n");
}
else if (marks <=79) {printf("\nYour Grade is A and GPA is 4\n");
}
else {printf("\nYour Grade is A+ and GPA is 5\n");
}
getch();
return 0;
}
# include <stdio.h>
int main()
{
int marks;
printf("Please enter your marks: ");
scanf("%d", &marks);
if (marks <=32) {printf("\nYour Grade is F and GPA is 0\n");
}
else if (marks <=39) {printf("\n\nYour Grade is D and GPA is 1\n");
}
else if (marks <=49) {printf("\nYour Grade is C and GPA is 2\n");
}
else if (marks <=59) {printf("\nYour Grade is B and GPA is 3\n");
}
else if (marks <=69) {printf("\nYour Grade is A- and GPA is 3.5\n");
}
else if (marks <=79) {printf("\nYour Grade is A and GPA is 4\n");
}
else {printf("\nYour Grade is A+ and GPA is 5\n");
}
getch();
return 0;
}
Thanx...bt it have to the system with how to make this C code in .exe file :d
ReplyDelete