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 Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...