Calculate the Grade and Points according to IUBAT grading system.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int marks;
Start:
printf("Enter the marks : \n");
scanf("%d",&marks);
(marks >= 0 && marks <= 100)? ((marks>=90)?(printf("Grade : A_4.0\n")):
((marks>=87)?(printf("Grade : B+_3.7\n")):
((marks>=84)?(printf("Grade : B_3.4\n")):
((marks>=80)?(printf("Grade : B-_3.1\n")):
((marks>=77)?(printf("Grade : C+_2.8\n")):
((marks>=74)?(printf("Grade : C_2.5\n")):
((marks>=70)?(printf("Grade : C-_2.2\n")):
((marks>=65)?(printf("Grade : D+_1.5\n")):
((marks>=60)?(printf("Grade : D_1.0\n")):
(printf("Fail\n"))))))))))) : printf("Invalid\n");
goto Start;
return 0;
}
Comments
Post a Comment