#include <iostream.h>
int main()
{
int ID,Choice,Addition,Subtraction,Multiplication,Division,Exit;
char Firstname[10];
char Lastname[10];
cout<<"Enter your Firstname\n";
cin>>Firstname;
cout<<"Enter your Lastname\n";
cin>>Lastname;
cout<<"Enter your ID\n";
cin>>ID;
cout<<"1. Addition\n";
cout<<"2. Subtraction\n";
cout<<"3. Multiplication\n";
cout<<"4. Division\n";
cout<<"5. Exit\n";
cout<<"Enter your Choice:\n";
cin>>Choice;
while (Choice != 5)
{
switch(Choice)
{
case 1: cout<<"You have selected Addition\n";Addition;break;
case 2: cout<<"You have selected Subtraction\n";Subtraction;break;
case 3: cout<<"You have selected Multiplication\n";Multiplication;break;
case 4: cout<<"You have selected Division\n";Division;break;
case 5: cout<<"You will Exit\n";Exit;break;
default:cout<<"Your selection is incorrect, You can only select number from 1-5\n";
cin>>Choice;
}
}
return 0;
}
shermili 0 Newbie Poster
Dark_Omen commented: Use Code tags, and people dont do hw for other people +0
herdi 0 Newbie Poster
herdi 0 Newbie Poster
shermili 0 Newbie Poster
Dave Sinkula 2,398 long time no c Team Colleague
jwenting 1,905 duckman Team Colleague
herdi 0 Newbie Poster
Dave Sinkula commented: Do you have anything to add? +0
jasweb2002 0 Junior Poster in Training
herdi 0 Newbie Poster
herdi 0 Newbie Poster
shermili 0 Newbie Poster
shermili 0 Newbie Poster
shermili 0 Newbie Poster
jwenting 1,905 duckman Team Colleague
jwenting 1,905 duckman Team Colleague
Darko 0 Newbie Poster
frrossk 2 Posting Whiz in Training
Darko 0 Newbie Poster
prog-bman 4 Junior Poster
Darko 0 Newbie Poster
jwenting 1,905 duckman Team Colleague
Darko 0 Newbie Poster
alc6379 120 Cookie... That's it Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.