hey i cant find out whats wrong. it just closes when you chose the #. try it
plz help
#include <iostream.h>
#include <conio.h>
int restart (char input, int x, int y);
int start (char intput, int x, int y);
void help (void);
int main() {
int input;
cout<<"Welcome to my program!" << endl;
cout<<"This is a program for calculating area of a rectangle or square."<< endl;
cout<<"Please chose 1 of the following."<< endl;
cout<<"1. START "<< endl;
cout<<"2. Exit "<< endl;
cout<<"3. Help"<< endl;
cin>>input;
switch (input) {
case 1: int start ();
break;
case 2: return 0;
break;
case 3: void help ();
break;
default: cout<<"invalid entry, please try again";
int restart ();
break;
}
return 0;}
void help (void) {
cout<<"This program was made by Robert Girard." << endl << "any questions or problems email me at [email protected]" << endl;
int Restart (char input, int x, int y);
}
int restart () {
char input;
cout<<"Welcome to my program!" << endl;
cout<<"This is a program for calculating area of a rectangle or square."<< endl;
cout<<"Please chose 1 of the following."<< endl;
cout<<"1. START "<< endl;
cout<<"2. Exit "<< endl;
cout<<"3. Help"<< endl;
cin>>input;
switch (input) {
case 1: int start ();
break;
case 2: return 0;
break;
case 3: void help ();
break;
default: cout<<"invalid entry, please try again";
int restart ();
break;
}
}
int start () {
int x;
int y;
char restart2;
cout<< "please enter a length"<<endl;
cin>>x;
cout<< "please enter a width"<<endl;
cin>>y;
return x*y;
cout<< "restart (y/e)"<<endl;
cin>>restart2;
if (restart2 == y)
{
restart ();
}else if (restart2 == y){
return 0;
}else
{
cout<< "invalid entry, shuting down";
return 0;
}
}