![]() |
![]() |
||||||
|
|||||||
![]() |
BZUPAGES Ramdan 2010 Edition |
![]() |
||||||||||
|
||||||||||||
|
|
|
|||||||||||
![]() |
![]() |
[C++] Programme to display an email address before @ sign |
![]() |
|
|
Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
#1
|
|
Code:
#include <iostream>
using namespace std;
char email[20];
string output;
int index;
int main()
{
index=0;
cout<<"please enter and email address : ";
cin>>email;
while(email[index]!='@')
{
cout<<email[index];
index++;
}
cout<<endl;
return 0;
}
Code:
#include <iostream>
using namespace std;
char email[20];
char output[20];
int index;
int main()
{
index=0;
cout<<"please enter and email address : ";
cin>>email;
while(email[index]!='@')
{
output[index]=email[index];
index++;
}
output[index]='\0';
cout<<"Email Address Before @ sign is "<<output<<endl;
return 0;
}
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| address, assignment, c++, display, email, programme, sign |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Funny Sign Boards... | Raheel | Funniest Pictures | 0 | 19-05-2010 04:00 PM |
| National Scholarship Programme 2010-11 ICT R&D specially for BZU and IUB | .BZU. | Alumni/Careers/Jobs | 0 | 21-01-2010 09:04 PM |
| Have you seen this funny sign boards | usman_latif_ch | Funniest Pictures | 1 | 07-01-2010 11:51 AM |
| Nokia introduces its Old Cell Phone recycling programme | usman_latif_ch | Daily News And halat-e-hazra | 0 | 13-06-2009 10:36 PM |
| plz share your comments about BS four years programme | engradnan_87 | Chit Chat | 1 | 29-10-2008 04:19 AM |
![]() |
Powered by vBulletin® Version 3.8.2 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. |