Write a program which take input Name, Age, Height, Gender and print them by using Escape Sequences and Format Specifiers.
#include <stdio.h>
int main()
{
char name [10];
char gender [10];
int age, height;
printf("Enter name: ");
scanf("%s",name);
printf("Enter gender: ");
scanf("%s",gender);
printf("Enter age: ");
scanf("%d",&age);
printf("Enter height: ");
scanf("%d",&height);
printf("\nName: %s \nGender: %s \nAge: %d \nHeight: %d\n",name,gender,age,height );
return 0;
}
Comments
Leave a comment