This is your code with a do-while loop and a your little continue thing... I made the spaces a little different (easier for me to read) so change 'em back if you don't like them. Notice the clrscr(); command after the do{ and the cont=getch(); statement. The first clears the screen and the second reads a character inputted by the user. The do-while loop is placed around the Menu and switch statement so that if the user wants to make another calculation, he can make a choice again.
Code:
#include <iostream.h>
#include <conio.h>
int main(){
int ch;
float m1,m2,mt,d1,d2,dt,a1,a2,at,s1,s2,st;
char cont;
do{
clrscr();
cout<<"Please select a number from the menu\n";
cout<<"1. Multiplication\n";
cout<<"2. Division\n";
cout<<"3. Addition\n";
cout<<"4. Subtraction\n";
cin>>ch;
switch (ch)
{
case 1:
cout<<"Please enter the 1st of the 2 numbers to multiply\n";
cin>>m1;
cout<<"Please enter 2nd of the 2 numbers to multiply\n";
cin>>m2;
mt = m1*m2;
cout<<"The total is "<<mt<<"\n";
break;
case 2:
cout<<"Please enter 1st of the 2 numbers to divide\n";
cin>>d1;
getnum:
cout<<"Please enter 2nd of the 2 numbers to divide\n";
cin>>d2;
if (d2 == 0){
cout<<"Invalid Number, Try again (don't use 0)\n";
goto getnum;
}
dt = d1/d2;
cout<<"The total is "<<dt<<"\n";
break;
case 3:
cout<<"Please enter the 1st of the 2 numbers to add\n";
cin>>a1;
cout<<"Please enter 2nd of the 2 numbers to add\n";
cin>>a2;
at = a1+a2;
cout<<"The total is "<<at<<"\n";
break;
case 4:
cout<<"Please enter the 1st of the 2 numbers to subract\n";
cin>>s1;
cout<<"Please enter 2nd of the 2 numbers to subtract\n";
cin>>s2;
st = s1-s2;
cout<<"The total is "<<st<<"\n";
break;
}
cout<<"Would you like to make another calculation?(y/n)";
cont=getch();
}while(cont!='n');
return 0;
}