Just starter to learn C++ and wanted to play about a bit and for some reason the code is not working the way it should be.
Why dose the switch not give any output? Please HELP!!!
enter in your two favourite numbers.
number 1: 2
number 2: 4
the numbers that you have entered are: 2, 4
the sum of those numbers when multiplayed is: 8
your second number is greater then your first number. the diffrance is: 2
#include <iostream>
usingnamespace std;
int main()
{
int FNumber1, FNumber2;
int Answer;
int Diffrance;
cout << "Enter in your two favorite numbers." << endl;
cout << "Number 1: ";
cin >> FNumber1;
cout << "Number 2: ";
cin >> FNumber2;
Answer = FNumber1*FNumber2;
cout << "The numbers that you have entered in are: " << FNumber1 << ", " << FNumber2 << "." << endl;
cout << "The sum of those numbers when multiplyed is: " << Answer << "." << endl;
switch (FNumber1, FNumber2)
{
case 1: FNumber1 < FNumber2;
Diffrance = FNumber2 - FNumber1;
cout << "Your second number is grater then you first number. The Diffrance is: " << Diffrance << "." << endl;
break;
case 2: FNumber1 > FNumber2;
Diffrance = FNumber1 - FNumber2;
cout << "Your first number is greater then your second number. The diffrance is: " << Diffrance << "." << endl;
break;
case 3: FNumber1 = FNumber2;
cout << "Your numbers are the same." << endl;
break;
}
system("pause");
return 0;
}