-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathP1PerDetails.c
34 lines (32 loc) · 1.07 KB
/
P1PerDetails.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Hitesh Patel Roll No: 999
WAP to print Personal Details using Scanf().
1 NAME:
2 COURSE:
3 AGE:
4 CITY:
5 ICECREAM FLAVOUR:
*/
#include <stdio.h>
int main()
{
int age;
char sname[20],scourse[20], scity[20], sicecream[30];
printf("ENTER NAME \n");
scanf("%s",sname);
printf("ENTER COURSE \n");
scanf("%s",scourse);
printf("ENTER CITY \n");
scanf("%s",scity);
printf("ENTER AGE \n");
scanf("%d",&age);
printf("""ENTER FAV ICECREAM \n");
scanf("%s",sicecream);
printf("======== PERSONAL DETAILS =======");
printf("\nYOUR NAME : %s",sname);
printf("\nYOUR COURSE : %s",scourse);
printf("\nYOUR AGE : %d",age);
printf("\nYOUR CITY : %s",scity);
printf("\nYOUR FAV ICECREAM : %s",sicecream);
printf("\n======== PERSONAL DETAILS =======");
//getch();
}