Write a program to print a roll no. , marks in p,e,m,,total, avg marks of student in c languge
Program:-
#include<stdio.h>
#include<conio.h>
main()
{
char name[17];
int roll, h,e ,m,t,av;
clrscr();
printf("enter the name of student");
gets(name);
printf("enter the roll number");
scanf("%d", &roll);
printf("enter the marks in english, hindi, math");
scanf("%d%d%d",&h,&e,&m);
t=h+e+m;
av=t/3;
clrscr();
printf("name of the student is %s\n" ,name);
printf("total marks=%d\n",t);
printf("avg marks =%d\n",av);
getch();
}
No comments:
Post a Comment