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
This assignment builds on Homework 3. The two major modifications are the instruction of pointers and the calculation of mortgage interest rates. Requirements for Project 2:

Can copy constructor admit an object of the same class as parameter, rather than reference of the object?

Write a C++ program that reads from keyboard 3 integers, with proper input prompt, and then displays the maximum sum of any pair of numbers from these three. If the 3 numbers are 5

Need help in network programming in C++ project. How much you charge?

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Abstract Classes Abstract classes are the classes, which are written just to act as base classes. Consider the following classes.                 class base

Project Description: I am trading binary options and need my signals that are sent to me via email to be sent to my followers via an RSS feed I have no idea how rss feeds imp

Project Description: We own proprietary software which long ago had Copyminder protection added. We no longer have the source code or a relationship with the original coder and

good night i have an assignment that i really need help with. i have to create a struct file with tag name book to have members int book_id char isbn[255]