Write a C program to create a file named "vtu.txt" which holds the records of student detail(vtu-no,name, mark1, mark2, mark3) calculate the total, average and display it.
Answers
Answered by
1
Answer:
simple method if u calculate suppose p,c,m three subject u calculate avg
here is solutions
#include <stdio.h>
#include <conio.h >
main ()
{
float p,c ,m,sum,avg;
ckrscr ()
{
printf ("enter subjects=");
scanf ("%f%f%f",&p,&c,&m,sum,avg);
sum=p+c+m;
avg=sum/5;
printf ("sum=%f\avg=%f",sum,avg);
getch ();
}
Similar questions