Wap to calculate total marks and percentage of 3 subjects, C/C++ Programming

WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL MARKS AND PERCENTAGE

#include stdio.h>

#include conio.h>

 

void main()

{

           int M1,M2,M3,Total;

           float Per;

           clrscr();

 

           printf("\n\n\t\t Enter the Marks of First Subject: ");

           scanf("%d",&M1);

           printf("\n\n\t\t Enter the Marks of Second Subject: ");

           scanf("%d",&M2);

           printf("\n\n\t\t Enter the Marks of Third Subject: ");

           scanf("%d",&M3);

 

           Total=M1+M2+M3;

             Per=Total/3;

 

           printf("\n\n\t\t Total Marks of Three Subject is: %d",Total);

           printf("\n\n\t\t Percentage is: %f",Per);

 

           if(Per>=70)

                                      printf("\n\n\t\t You got DISTINCTION");

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

                                      printf("\n\n\t\t You got FIRST CLASS");

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

                                      printf("\n\n\t\t You got SECOND CLASS");

           else if(Per>=40&&Per<=50)

                                      printf("\n\n\t\t You got PASS CLASS");

           else

                                      printf("\n\n\t\t You got FAIL CLASS");

           getch();

}

 

OUTPUT

 

9_WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL MARKS AND PERCENTAGE.jpg

Posted Date: 9/10/2012 8:31:43 AM | Location : United States







Related Discussions:- Wap to calculate total marks and percentage of 3 subjects, Assignment Help, Ask Question on Wap to calculate total marks and percentage of 3 subjects, Get Answer, Expert's Help, Wap to calculate total marks and percentage of 3 subjects Discussions

Write discussion on Wap to calculate total marks and percentage of 3 subjects
Your posts are moderated
Related Questions
d) a "static destructor" is a static member function of the class which accepts one argument - a pointer to the object of that class to be cracked. It is probably utilized along wi

Your program will read two kinds of data from two files: names and predicates. It will read a formal expression from standard input and check whether that expression is syntactical


Implement the search property from catalogue menu option.  After selecting this option the user should be asked to specify the property using the following sub-menu: 1. Specif


A name clash happens when a name is described in more than one place. For example, two dissimilar class libraries could give two different classes the similar name. If you try to u

Can any constructor throw an exception? How to handle error while the constructor fails?

i need a program that find the number of negative integers in a list.

Employ operator () instead of operator[]. While you have multiple subscripts, the cleanest way to do it is along with operator () instead of with operator[]. The reason is that

write a program to find the area under the curve y=f(x) between x=a & x=b