|
-
Apr 11th, 2000, 08:43 AM
#1
Thread Starter
Dazed Member
yes yes i know it's a vb site but know there are some
of you out there that know C++ too, so here i go.....
I guess this is like using select case in VB.
switch (selection)
{
case 1: cout << " How many hours would you like to convert?: ";
cin >> Hours;
x1 = (Hours * 60);
cout << setw(2) << Hours << " Hours equals " << x1 << " Minutes " << endl << endl;
break;
case 2: cout << " How many minutes would you like to convert?: " ;
cin >> Minutes ;
x2 = (Minutes / 60) ;
cout << setw(2) << Minutes << " Minutes equals " << x2 << "
Hours " << endl ;
break;
}
cout << " Would you like to make another selection? yes or no: ";
cin >> choice;
If (choice == "yes")
??????? How would you be able to start over from the begining of the program or to any point in the program that
you want to start from?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|