Yes it's very simple here is some code enter your code where the =
ellipses (...) are:
#include <iostream.h>
void main()
{
char choice;
do=20
{
... // your code here
cout<<"Would you like to do another? (y=3Dyes, n=3Dno): ";
cin>>choice;
}
while (choice !=3D n);
}
Enjoy, I hope that helped.
----- Original Message -----=20
From: J R=20
To: dev...@li...=20
Sent: Monday, October 02, 2000 1:35 PM
Subject: [Dev-C++] (no subject)
i have a program that asks the user to enter some numbers, finds the =
answers and reports them. at the end i used the=20
system("pause")
function which asks the user to press a key and then it closes the =
program. Is there anyway to get the program to just keep returning to =
the beginning without having to restart it? =20
Thanks
-------------------------------------------------------------------------=
-----
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
-------------------------------------------------------------------------=
-----
Link is external to the Privacyx.com System
|