Basically today I tell you a simple program which written on C language for the Grading system nested condition flow.
there are so many ways to make a grading system but I'm sharing with you a very basic and very simple method Code.
so let's start.
#include<conio.h>
#include<stdio.h>
main()
{
//Grading system - Nested conditional flow
int obt,max;
float per;
printf("Grading System");
printf("\n***************\n\n");
printf("Enter obtained marks:"); scanf("%d",&obt);
printf("Enter max marks:"); scanf("%d",&max);
per = obt * 100 / max;
if(per>=80)
printf("Congrats! you got A-1 Grade");
else if(per>=70)
printf("Good, you got A Grade");
else if(per>=60)
printf("You secure B-Grade");
else
printf("You are fail :-( you need to work hard more");
getch();}
I hope you understood the above code.
Tidak ada komentar:
Posting Komentar