Program No : 8 :

Write a program in C for given mark contain which grade ?

     program no  : 8
 purpose : print the grade of given mark.

	#include <"stdio.h">
	void  main()
	{
		int mark; 

		scanf("%d",&mark);

		if ( mark>=70)
			printf("distinction");
		else
			 if ( mark>=60)
				 printf("first class");
			  else
				  if( mark>=50)
					printf("second class");
				  else
					  if(mark>=40)
						  printf("third class");
					  else
						  printf("fail"); 	
		
	}  

Back