My Comp Sci teacher gave us 2 basic C++ tasks to do for homework. I've managed to do the first one, but this second one is confusing me. I'm supposed to write code that recognizes if one value is larger than the other, and print out a message saying if one value is larger or not larger than the other. The code:
#include<iostream>
using namespace std;
int main() {
int num1, num2;
cout << "Unesi broj" << endl;
cin >> num1, num2;
if (num1 > num2) {
cout << "First number is bigger than the second" << endl; }
else if (num1 < num2); {
cout << "First number isn't bigger than the second" << endl;
}
return 0;
}
If anyone could help me out it'd be amazing, since this is a graded task.