Computer Science, asked by ansh001142, 6 months ago

Write a program to enter total marks of a student and print grading system for following
criteria-
Marks
criteria
>=80
grade A
>=70
grade B
>=60
grade C
>=50
grade D
<50
fail​

Answers

Answered by manavpaul27
1

#include<stdio.h>

void main()

{

int marks;

printf("Enter your marks ");

scanf("%d",&marks);

if(marks<0 || marks>100)

{

printf("Wrong Entry");

}

else if(marks<50)

{

printf("FAIL");

}

else if(marks>=50 && marks<60)

{

printf("Grade D");

}

else if(marks>=60 && marks<70)

{

printf("Grade C");

}

else if(marks>=70 && marks<80)

{

printf("Grade B");

}

else if(marks>=80 && marks<90)

{

printf("Grade A");

}

else

{

printf("Grade A+");

}

}

Similar questions
Math, 2 months ago