PROGRAM TO SHOW THE PHONE NUMBERS USING STRUCTURE IN C++



Hello Friends !!!! Today I am going to tell about the simple program of structure in c++.Program to show phone number.This program show you two numbers in this way 123(111)-7562 Look like this.One phone number input directly and other input by user and then show in same manner.
So the Program is Here=>.
//Name : Mayank Sharma
//Roll No : 26
//C.S.E(4th Sem)

// Write a Program To show and input a Complete Phone Number //

#include
#include
struct phone
{
char areacode[10];
char exchangecode[10];
char pincode[10];
} p1;
void main()
{
clrscr();
phone p1={"222","456","7800"};
cout<<"My phone no is :"<<"\n\n";
cout< cout<<"Enter your phone Number"<<"\n\n";
cin>>p1.areacode>>p1.exchangecode>>p1.pincode;
cout<<"Your phone number is :"<<"\n\n"< getch();
}


//Output Of This Program ://


My phone no is :
222(456)-7800
Enter your phone Number
212
345
3400
Your phone number is :
212(345)-3400

I think this post will help you.I think this post will help you.
Thanks!!!
If any query about this post then put your comment in comment box below..

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites