0
2.5kviews
Write a program to display the class according to the marks scored by the student. The marks scored is taken as input and according to class is displayed.

Subject : Structured Programming Approach

Title : Control Structures

Marks : 5M

1 Answer
0
254views
#include<stdio.h>
#include<conio.h>
void main()
{
int marks;
clrscr();
printf("Enter marks scored (0-100):");
scanf("%d",&marks);
if(marks>=70)
{
    printf("Distinction");
}
else
{
    if (marks>=60)
    {
        printf("First Class");
    }
    else
    {
        if (marks>=50)
        {
            printf("Second Class");
        }
        else
        {
            if(marks>=40)
            {
printf("Pass Class");
}
else
    {
    printf("Fail");
    }
        }
    }
}
getch();
}
Please log in to add an answer.