Percentage of Six Subjects

Percentage Calculator of Six Subjects by Mohit Purohit

C
O
D
E

/*
Creator - Mohit Purohit
Date - 07 Jan. 2022
Time - 11:31 P.M.
*/
#include<stdio.h>
#include<conio.h>
void main()
{   
    clrscr ();
    int Hindi, English, Mathematics, Science, Sanskrit, SocialStudies, Total=480 ;
    float sum, per;
    printf("Enter the marks of Hindi : ");
    scanf("%d",&Hindi);
    printf("Enter the marks of English : ");
    scanf("%d",&English);
    printf("Enter the marks of Mathematics : ");
    scanf("%d",& Mathematics);
    printf("Enter the marks of Science : ");
    scanf("%d",&Science);
    printf("Enter the marks of Sanskrit : ");
    scanf("%d",&Sanskrit);
    printf("Enter the marks of Social Studies : ");
    scanf("%d",&SocialStudies);
    
    sum=Hindi+English+Mathematics+Science+Sanskrit+SocialStudies;
    printf("Sum of marks=%f/480",sum);
    per=(sum*100)/Total;
   
    printf("\nPercentage of marks=%f",per);
    getch();
}

____________________________________________________________________

Comments

Popular posts from this blog

Multiplication Table