Computer Science, asked by subhangi95, 1 year ago

write a basic program to accept the name of a student, his marks in four subjects and print their average​

Answers

Answered by baluranjan
1

#include<stdio.h>

void main()

{

int sum,m1,m2,m3,m4;

float avg;

char s[100];

printf("Enter Student Name\n");

scanf("%s",&s);

printf("Enter Marks of the Student\n");

scanf("%d %d %d %d",&m1,&m2,&m3,&m4);

sum=m1+m2+m3+m4;

avg=sum/4;

printf("Average = %f\n",avg);

getch();

}

Similar questions