C program to find the grade of your mark using Else if ladder.

 

C program

C PROGRAM


C program to find the grade of your mark using Else if ladder

#include <stdio.h>
#include<conio.h>
void main()
{
  int marks;
  clrscr();
  printf("Enter your marks out of 100 \n");
  scanf("%d",&marks);
  if(marks>=95)
  printf("the grade is S");
  else if(marks>=90)
  printf("the grade is A");
  else if(marks>=80)
  printf("the grade is C");
  else if(marks>=70)
  printf("the grade is D");
  else
  printf("the grade is F");
  getch();
  }

OUTPUT :

Enter your marks out of 100 
96
the grade is S
Process finished.


infinitynotes00

Comments

Popular posts from this blog

Write a program to calculate a students result based on two examinations, 1 sports event, and 3 activities conducted. The weightage of activities= 30%, sports= 20% , and examinations= 50%.

Determine the intensity of shear of an oil having viscosity= 1 poise. The oil is used for lubricating the clearance between a shaft of diameter 10 cm and its journal bearing. The clearance is 1.5mm and the shaft rotates at 150 r.p.m.