SMS Service

Read and Listen Online Quran

Recite Holy Quran Pak

BZUPAGES Ramdan 2010 Edition

HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Bahauddin Zakariya University Multan; Source of Presentations,Reports & Student's Assignments > Institute of Computing > Bachelor of Science in Information Technology > BsIT 3rd Semester > Data Structure

Data Structure Lectures by Sir Ahsan..

 

Reply

[C++] Programme to display an email address before @ sign

 
Thread Tools Search this Thread Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1  
Old 02-09-2008, 06:51 AM
BSIT07-01's Avatar
BSIT07-01 BSIT07-01 is offline
Addicted to Computer


User owns 1x Bluepawprint/Animal Rescue User owns 2x Gold User owns 1x Ring User owns 1x Medal User owns 1x BZU angel User owns 1x Fish User owns 2x Banana User owns 1x Earth/Protect Our Planet User owns 1x Slush User owns 1x Treasure. User owns 1x Umbrella User owns 1x Easter Eggs User owns 2x Doughnuts User owns 1x Dummy. User owns 1x Burger User owns 1x Cake
 
Join Date: Sep 2007
Location: ------------
Age: 20
Posts: 1,140
Thanks: 368
Thanked 218 Times in 184 Posts
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
Time Spent Online: 1 Month 1 Day 1 Hour 6 Minutes 44 Seconds
Default [C++] Programme to display an email address before @ sign

The simple One
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;
}
An extended One

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;
}
Reply With Quote
http://bzupages.com/images/share-on-me-banner-.jpg
 
Reply

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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


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

Webmaster Forum
Note: This is an unofficial Site... We are no way officially affiliated with Bahauddin Zakariya University
Your Ad Here

All times are GMT +5. The time now is 12:22 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.