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
Write a C program to compute the factorial of  5 i.e 1x2x3x4x5 etc #include stdio.h   void main()   {   char promt;      int factor;   factor = 1*2*3*4*5;   printf("The fac

Inheritance and Reuse Consider a car manufacturing company. When they require building a new car, they have two choices. They can start from the scratch, or they can change an

Academic expert for Genetic Algorithm Project Description: Seeking academic expert for Genetic Algorithm. Skills required are Academic Writing, Algorithm, C++ Programming,

THIS PROGRAM IS TO ADD THE TWO COMPLEX NO.S GIVEN BY THE USER  */ #include #include #include struct complex     {     int real;     int imag;     }; void main()  {  clrs

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

assume that the first integer read with cin specifies the number of values remaining to be entered. that program should read only one value each time cin is executed .a typical inp

1.1 A Few Notes: 1. Please test your program with various inputs prior to submission. 2. All group members must understand the entire project for interactive grading. Equal

Implementing files in c++

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec