Saturday, 31 March 2018

Program to enter name,age add,fee,roll no in C

This is a program of enter the name ,age ,fee ,roll no ,address in C . As there is having five variable in this so we have to firstly declare five variable at the starting of the program then we have to input the values of these variable with printf() after enter we have to use scarf() for storing these variable .And at last again we have to use to printf () for showing the result on the output screen. now we are going to write the program.

void main()
int roll no;
char name [20];
int age;
char address [50];
float fee;
printf ("\n Enter your roll no :");
scanf ( "%d", & roll no);
printf ("\n Enter your name:");
scanf ("%s", name);
printf ("\n Enter your age :");
scanf ("%d", & age);
printf ("\n Enter your address :");
scanf ("%s",address);
printf ("\n Enter your fee :");
scanf ("%f",& fee);
printf ("\n your roll no is :%d", roll no);
printf ("\n your name is :%s", name);
printf ("\n your age is :%d", age);
printf ("\n your address is :%s", address);
printf ("\n your fee is :%f",fee);

No comments:

Post a Comment

Featured post

Program to find maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...