HomeHome Entertainment & enjoymentEntertainment Recite QuranRecite Quran Institute of ComputingInstitute of Computing Institute of Management and Sciences and Commerce DepartmentIMS/Commerceý Faculty of Science and Agriculture Science/Agriculture Faculty of Arts and LanguagesArts/Languagesý
 
We just want to say best of luck for your mid term exams...

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
 
Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 02-09-2008, 06:51 AM   #1
BSIT07-01
Addicted to Computer


Points: 62,755, Level: 100 Points: 62,755, Level: 100 Points: 62,755, Level: 100
Level up: 0% Level up: 0% Level up: 0%
Activity: 81.3% Activity: 81.3% Activity: 81.3%
Last Achievements
Items User owns 1x Bluepawprint/Animal Rescue User owns 2x Gold User owns 1x Medal User owns 1x Ring 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
BSIT07-01's Avatar
Join Date: Sep 2007
Location: ------------
Age: 20
Posts: 1,103
Thanks: 320
Thanked 212 Times in 178 Posts
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
Time Spent Online: 1 Month 49 Minutes 24 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;
}
__________________
BSIT07-01 is offline Reply With Quote
Reply

Bookmarks

Tags
address, assignment, c++, display, email, programme, sign


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

(View-All Members who have read this thread : 1
killer
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
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 11:36 PM
This is Pakistan : Some Funny Pictures and messages on sign boards and Banners .BZU. Funniest Pictures 2 28-02-2009 07:59 AM
plz share your comments about BS four years programme engradnan_87 Chit Chat 1 29-10-2008 03:19 AM

Send FREE SMS to Pakistan | Funny SMS
Note: This is an unofficial Site... We are no way officially affiliated with Bahauddin Zakariya University
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.