uhm... compile this, run it, then tell me what happens...
Code:
#include <iostream>
int main()
{
int a,b,c;
cout<<"Welcome to Adam Petrosh's kinda kool kalkulator! Enter 1 for subtraction, 2 for addition, 3 for multiplying, and 4 for division: ";
cin>>a;
if(a == 1)
{
cout<<"You have chosen Subtraction!";
cout<<"Please enter the two numbers you want to subtract(seperate them with a space): ";
cin>>b,c;
cout<<"Prossessing.... complete!";
cout<<"The answer is ";
cout<<(b-c);
cin.get();
}
if(a == 2)
{
cout<<"You have chosen addition!";
cout<<"Please enter the two numbers you want to add(seperate them with a space): ";
cin>>b,c;
cout<<"Prossessing... complete!";
cout<<"The answer is ";
cout<<(b+c);
cin.get();
}
if(a == 3)
{
cout<<"You have chosen multiplication!";
cout<<"Please enter the two numbers you want to multiply(seperate them with a space): ";
cin>>b,c;
cout<<"Prossessing... complete!";
cout<<"The answer is ";
cout<<(b*c);
cin.get();
}
if(a == 4)
{
cout<<"You have chosen division!";
cout<<"Please enter the two numbers you want to multiply(seperafe them with a space): ";
cin>>b,c;
cout<<"Prossessing... complete!";
cout<<"The answer is ";
cout<<(b/c);
cin.get();
}
else
{
cout<<"I SAID 1, 2, 3, OR 4 YOU IDIOT! PROGRAM TERMINATING!";
cin.get();
}
cin.get();
return 0;
}