Grade Using C Program Tamil


#include<stdio.h>
#include<conio.h>
void main()
{
    int en,ta,ma,sc,so,tot;
    float avg;
    clrscr();
    printf("\nEnter the 5 marks :");
    scanf("%d%d%d%d%d",&ta,&en,&ma,&sc,&so);
    tot=ta+en+ma+sc+so;
    avg=tot/5;
    printf("\nTotal : %d",tot);
    printf("\nAverage :%f",avg);  //www.tutorjoes
    if(ta>=35&&en>=35&&ma>=35&&sc>=35&&so>=35)
	{
	    if(avg>=35&&avg<=60)
	    {
		printf("\nGrade D");
	    }
	    else if(avg>60&&avg<=70)
	    {
		printf("\nGrade C");
	    }
	    else if(avg>70&&avg<=90)
	    {
	       printf("\nGrade B");
	    }
	    else if(avg>90&&avg<=100)
	    {
	      printf("\nGrade A");
	    }

	}
	else
	{
	   printf("\nFail");
	}
	getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming