Marks of five subject list and average in c


Marks of five subject list and average in c


#include<stdio.h>

int main()

{

float p,c,m,h,e,avg;
  
printf("enter marks of physics\n");
  
scanf("%f",&p);
  
printf("ente marks of chemistry\n");
  
scanf("%f",&c);
  
printf("enter marks of maths\n");
  
scanf("%f",&m);
  
printf("enter marks of hindi\n");
  
scanf("%f",&h);
  
printf("enter marks of english\n");
  
scanf("%f",&e);
  
avg=(p+c+m+h+e)/5;
  
printf("Average of result=%f",avg);

}

Post a Comment

0 Comments