do you mean return main() after it runs the functions? if so, it does return to main(). the way you had the while loop written there was nothing to keep the flow inside. i made the noted change and also took out the "main() return(0);" you had at the bottom of each function--i don't know if they served a purpose or not
also, i used code tags. it makes your code easier to read so use them next time.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <conio.h>
int BYC();
int TDC();
int main()
{
int sel;
while (sel!=4)// :cool:
{
cout<<"1. Bet You Can't\n";
cout<<"2. Two Digit Calculater\n";
cout<<"3. \n";
cout<<"4. Exit\n";
cout<<"Enter selection 1, 2, 3 or 4: ";
cin>>sel;
if (sel>4 || sel<1)
{
cout<<"Error! No such input.\n";
}
switch (sel)
{
case 1:
BYC();
break;
case 2:
TDC();
break;
case 3:
break;
case 4:
break;
}
}
return 0;
}
int BYC()
{
char let;
while(let!='l')
{
for(int num=1;num<1000;num++)
{
cout<<"Bet You Can't Stop This!\n";
}
cout<<"I'll give you a chance to stop it(enter a letter):";
cin>>let;
}
cout<<"Lucky guess\n\n";
}
int TDC()
{
int n1;
char op;
int n2;
cout<<"This calculater can only calculater two intergers, \n"
<<"* = Multiplycation,\n / = Division, + = Addition, - = Subtraction.\n";
cout<<"Enter first integer:";
cin>>n1;
cout<<"Enter a operator:";
cin>>op;
cout<<"Enter second integer:";
cin>>n2;
switch(op)
{
case '+':
cout<<n1+n2;
break;
case '-':
cout<<n1-n2;
break;
case '*':
cout<<n1*n2;
break;
case '/':
cout<<n1/n2;
break;
}
}