//Program to Accept and Display Address
#include<stdio.h>
#include<conio.h>
int main()
{
int a;
unsigned b;//As your pin code is big integer constant
char *ch1,*ch2,*ch3;//Strings to accept Street, City and Name
clrscr();
printf("Enter the name\n");
gets(ch1);
printf("\nEnter Door No and Street");
printf("\n");
scanf("%d",&a);
fflush(stdin);
gets(ch2);
printf("\nEnter City and Pin code\n");
gets(ch3);
scanf("%d",&b);
printf("\nName : %s",ch1);
printf("\nDoor No. : %d Street : %s",a,ch2);
printf("\nCity : %s Pin Code : %u",ch3,b);
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
#include<stdio.h>
#include<conio.h>
int main()
{
int a;
unsigned b;//As your pin code is big integer constant
char *ch1,*ch2,*ch3;//Strings to accept Street, City and Name
clrscr();
printf("Enter the name\n");
gets(ch1);
printf("\nEnter Door No and Street");
printf("\n");
scanf("%d",&a);
fflush(stdin);
gets(ch2);
printf("\nEnter City and Pin code\n");
gets(ch3);
scanf("%d",&b);
printf("\nName : %s",ch1);
printf("\nDoor No. : %d Street : %s",a,ch2);
printf("\nCity : %s Pin Code : %u",ch3,b);
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
Thanks :D
ReplyDelete