C program to Calculate Average and Percentage Marks/

#include<stdio.h>
#include<conio.h>
void main()
{
 clrscr();
 int mark[5], i;
 float sum=0;
 printf("Enter marks obtained in Physics, Chemistry, Maths, CS, English :");
 for(i=0; i<5; i++)
 {
  scanf("%d",&mark[i]);
  sum=sum+mark[i];
 }
 float avg=sum/5;
 float perc;
 perc=(sum/500)*100;
 printf("Average Marks = %f",avg);
 printf("\nPercentage = %f%",perc);
 getch();
}
C program to Calculate Average and Percentage Marks/ C program to Calculate Average and Percentage Marks/ Reviewed by on December 22, 2019 Rating: 5

No comments:

Powered by Blogger.