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

Assignment Help:

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


Related Discussions:- Wap to calculate total marks and percentage of 3 subjects

Create a programming system, Your task is to create a programming system fo...

Your task is to create a programming system for a ferry. The ferry transports passengers and vehicles (cars, busses, lorries and bicycles). The ferry has space for 200 passengers a

Decode the code, By pressing ‘6’ (i.e. key’6’ one time) on the keypad, the ...

By pressing ‘6’ (i.e. key’6’ one time) on the keypad, the mobile shows ‘m’ on display screen in write text message area .

Need a solution, Hello. I need a solution for this assignment. It is for C+...

Hello. I need a solution for this assignment. It is for C++ Language: Create a BusinessPartner class that contains a first name, company name, and a telephone number. Create a Con

Is there anything you can do in c++ which you cannot do in c, A: No. There ...

A: No. There is nothing you can do in C++ which you cannot do in C. In spite of everything

Explain the continue statement, The continue statement The continue sta...

The continue statement The continue statement causes the next iteration of the enclosing loop to start. When this is encountered in the loop , the rest of the statements in the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd