I would like to know what to include in my programs so that they go back to the start of the program once its done so you can start again.
example code:
#include <iostream.h>
#include <stdio.h>
int main()
{
int number1 = 0;
cout << "Enter a number";
cin >> number1;
int number2;
cout << "Enter another number";
cin >> number2;
int total;
total = (number1) + (number2);
cout << "Total is:";
cout << total;
return 0;
}
What would you add to this example code to make it so that the program goes back to the beginning after it gives you the answer?
Thanks
-Chris