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

Arrys, Write a program that allows user to enter number of elements in an a...

Write a program that allows user to enter number of elements in an array. The program then allows user to enter the elements. Write a function called max that returns the position

How are postfix and prefix versions of operator++ , How are postfix and pre...

How are postfix and prefix versions of operator++ () differentiated? A: The postfix version of operator++ () contain a dummy parameter of type int. The prefix version does not c

Contacts manager data and image facebook sync, Project Description: coll...

Project Description: collect / modify person records / photo images/ lookup / facebook iphone and ipad App basic function : 1 user will configure facebook connection

C++ Data Structure program, Description A long time ago in a galaxy far, f...

Description A long time ago in a galaxy far, far away, the country Mafghanistan had n cities and m old roads, where each road connected a pair of cities. Due to the treacherous mo

#title., #quGiven the Array class definition in Fig. 11.10-11.11 (pp. 476-4...

#quGiven the Array class definition in Fig. 11.10-11.11 (pp. 476-479) of the textbook, write a new overloaded operator function for the ‘%’ (modulus) operator (i.e., return an arra

Saha, find the minimum total number of shelves

find the minimum total number of shelves

What are arrays, What are Arrays? Numerous applications require the pro...

What are Arrays? Numerous applications require the processing of multiple data items that have identical characteristics. In such circumstances it is frequently convenient to p

What does odbc do in context with php, What does ODBC do in context with PH...

What does ODBC do in context with PHP? PHP supports many databases such as dBase, Microsoft SQL Server, Oracle, etc. however, it also supports databases such as filePro, FrontB

When i develop a destructor, When I develop a destructor, do I require to e...

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

#c++, There is a pebble merchant. He sells the pebbles, that are used for s...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

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