0% found this document useful (0 votes)
28 views3 pages

Department of Applied Physics: Assignment #02 Q1

This document contains a C program code that takes input of marks obtained in different subjects (English, Urdu, Physics, Chemistry, Math) out of 100 for each subject. It then calculates the total marks out of 500 and percentage. The program prints the marks obtained in each subject and the total marks and percentage.

Uploaded by

UbaidZehri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Department of Applied Physics: Assignment #02 Q1

This document contains a C program code that takes input of marks obtained in different subjects (English, Urdu, Physics, Chemistry, Math) out of 100 for each subject. It then calculates the total marks out of 500 and percentage. The program prints the marks obtained in each subject and the total marks and percentage.

Uploaded by

UbaidZehri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DEPARTMENT OF APPLIED

PHYSICS
ASSIGNMENT #02
Q1
#include <studio.h>
#include<conio.h>
Void main (void);
{
Clrscr();
Float math,physic,chemistry, urdu, English,Total,percentage;
Printf(enter marks obtain in English out of 100:);
Scanf(%f,&english);
Printf(enter the marks obtain in urdu out of 100:);
Scanf(%f,&urdu);
Printf(enter the marks obtain in physics out of 100:);
scanf(%f,&phyiscs );
printf(enter the marks obtain in chemistry out of 100:);
scanf(%f,&chemistry);
printf(enter the marks obtain in maths out of 100:)
scanf(%f,&math);

clrscr()
Total=math+physic+chemistry+urdu+English;
Percentage=(Total/500)*100;
Printf(\n\n);
Printf(marks obtained in English out of 100:%.2f\n\n;English);

Printf(marks obtained in urdu out of 100:%.2f\n\n;urdu);


Printf(marks obtained in physic out of 100:%.2f\n\n;physic);
Printf(marks obtained in chemistry out of 100:%.2f\n\n;chemistry);
Printf(marks obtained in math out of 100:%.2f\n\n:math);
Printf(total marks obtained out of 500:%.2fn\n\;percentage);
Printf(press any key to continue:\n\);
Printf(-------------);
Getch()
}
Output
Plz enter the marks obtained in English out of 100:
Plz enter the marks obtained in urdu out of 100:
Plz enter the marks obtained in physic out of 100:
Plz enter the marks obtained in chemistry out of 100:
Plz enter the marks obtained in maths out of 100:
The marks obtaibed in English out of 100 :
The marks obtaibed in urdu out of 100 :
The marks obtaibed in physic out of 100 :
The marks obtaibed in chemistry out of 100 :
The marks obtaibed in mahts out of 100 :
The Total marks obtained out of 500 Are:
The Total percentage is:
Press any key to continue:

You might also like