Calculate sum of 5 subjects and Find percentage.

#include <stdio.h>


  int main()

  {

    float phy,chem,math,eng,hindi,percentage;

    printf("enter marks of  phy");

    scanf("%f",&phy);

    printf("enter marks of  chem");

    scanf("%f",&chem);

     printf("enter marks of  maths");

    scanf("%f",&math);

     printf("enter marks of  eng");

    scanf("%f",&eng);

     printf("enter marks of  hindi");

    scanf("%f",&hindi);

    

    percentage=100*(phy+chem+math+eng+hindi)/500;

    printf("total percentage is %f",percentage);

    

   return 0;

   }


No comments:

Post a Comment

Programming in C Language

  PROGRAM LIST TO BECOME PRO IN C    😍😍😍            PRACTICE SETS                                                        UNIT -1  👇   IN...