Jan 21, 2013 at 10:15pm UTC
// == equals comparing != Equals (First Value != Second value(NOT equal to second value)
// >= Greater than or equal too, <= Less than or equal too
#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int FirstValue;
int SecondValue;
cin >> FirstValue;
cin >> SecondValue;
if(FirstValue==SecondValue){
cout << "Equal!" << endl;
}
else if(FirstValue>SecondValue){
cout << "First Value is greater than the Second Value!" << endl;
}
else if(FirstValue<SecondValue){
cout << "Second Value is greater than the First Value!" << endl;
}
else(FirstValue!=SecondValue);{
cout << "Not Equal!" << endl;
getch();
return 0;
}
}
This is the code, If I put in too matching integers it comes up as "Equal!" as well as "Not Equal!" How can I fix this?
Last edited on Jan 21, 2013 at 10:27pm UTC