Assignment of Programming and Problem Solving in C
1
st
Assignment :
If the marks of a student in five different subjects entered by the keyboard so find outthe average marks and percentage of obtained marks of student assume the max. marks ofeach subject is 100. /* A program of print the marksheet and show the percentage of obtained marks*//* Note : I'm using only 5 subjects and each subjects have max : 100 and min 40 marks*/#include<stdio.h>void main(){int mca101,mca102,mca103,mca104,mca105,total;float per;clrscr();printf("Please enter the marks of MCA101 : ");scanf("%d",&mca101);printf("Please enter the marks of MCA102 : ");scanf("%d",&mca102);printf("Please enter the marks of MCA103 : ");scanf("%d",&mca103);printf("Please enter the marks of MCA104 : ");scanf("%d",&mca104);printf("Please enter the marks of MCA105 : ");scanf("%d",&mca105);total=mca101+mca102+mca103+mca104+mca105;per=total/5;printf("\n ---------------------------------------------------------------");printf("\n * MARKSHEET OF MCA -I SEM *" );printf("\n ---------------------------------------------------------------");printf("\n SUBJECT SUBJECT CODE MIN MAX MARKS OBTAINED");printf("\n ---------------------------------------------------------------");printf("\n Information Technology MCA 101 40 100 %d",mca101);printf("\n Mathematical Foundation MCA 102 40 100 %d",mca102);printf("\n Programming in C MCA 103 40 100 %d",mca103);printf("\n Computer Organization MCA 104 40 100 %d",mca104);printf("\n Communication Skills MCA 105 40 100 %d",mca105);printf("\n ---------------------------------------------------------------");printf("\n TOTAL 200 500 %d",total);printf("\n ---------------------------------------------------------------");printf("\n # PERCENTAGE : %f % #",per);getch();}
Screen Print of program:
Please enter the marks of MCA 101 : 80Please enter the marks of MCA 102 : 80Please enter the marks of MCA 103 : 80Please enter the marks of MCA 104 : 80Please enter the marks of MCA 105 : 80---------------------------------------------------------------------------------------------------------------* MARKSHEET OF MCA - I SEM *---------------------------------------------------------------------------------------------------------------SUBJECT SUBJECT CODE MIN MAX MARKS OBTAINED---------------------------------------------------------------------------------------------------------------Intormation Technology MCA 101 40 100 90Mathematical Foundation MCA 101 40 100 90Programming in C MCA 101 40 100 90Computer Organization MCA 101 40 100 90Communication Skills MCA 101 40 100 90--------------------------------------------------------------------------------------------------------------- TOTAL 200 500 450---------------------------------------------------------------------------------------------------------------
2
Hirdesh Singh Rajput
Leave a Comment