Tuesday, July 2, 2013

Student Details

C Programs

// Student Details

#include
#include
void main()
{
char name[20];
int m1,m2,total;
clrscr();
printf(“enter the student name\n”);
scanf(“%s”,&name);
printf(“enter the m1,m2\n”);
scanf(“%d,%d”,&m1,&m2);
total=m1+m2;
printf(“\n total:%d”,total );
getch();
}
output:
enter the student name
uma
enter the m1,m2
120
80

total:200

No comments:

Post a Comment