you see how it works?
Code:
#include <iostream>
using namespace std;
int mult ( int x, int y );
int questioning() /*input and if statement*/
{
char color;
cout<<"What is your favorite color?\n";
cin>>color;
cin.ignore();
cout<<"I wonder why your favorite color is" << color << "\n";
char reply;
cout<<"Are you sure your favorite color isn't Lavender? (Y or N)\n";
cin>>reply;
cin.ignore();
if ( reply == 'Y' || 'y' ) {
cout<<"Your read my mind.\n";
}
else if ( reply == 'N' || 'n' ) {
cout<<"I might just download you a virus, but as a second chance you can halp me solve a problem.\n";
}
cin.get();
}
int gears() /*loops*/
{
cout<<"To help me switch gears.\n";
cin.get();
for ( int x = 0; x < 15; x++ ) {
cout<<x<<endl;
}
cin.get();
}
int multiplecation() /*funtions*/
{
int x;
int y;
cout<<"Can you please tell me two large numbers to divide.\n";
cin>> x >> y;
cin.get();
cout<<"The divident of those numbers are" << ( x / y ) <<"\n";
cin.get();
}
int mult ( int x, int y)
{
return ( x / y );
}
int main()
{
cout<<"I hope your are doing well today\n"; /*basic hello*/
questioning();
gears();
multiplecation();
mult(2,5);
}
Now, in your main() function, you can do something like:
Code:
// Not real code!!!!
cout<< "Choise 1,2,3,4,5?";
cin>> int choose;
switch(choose)
{
case '1':
questioning();
break
case '2':
mult(2,5);
break
Look up switch/case to see how to do it properly