我是一個初學者的學習代碼,我正在複製什麼YouTube編程教學視頻說。但是當我編寫代碼時,會導致一些錯誤。這個c + +代碼有什麼問題
下面的代碼:
#include <iostream>
using namespace std;
int main()
{
int num1 , num2;
cout<< " Enter number 1 and number 2 \n";
cin>> num1 >> num2;
if (num1 == num2);
cout<< "The both numbers are equal \n";
else if (num1> num2)
cout<< "Number 1 is greater than number 2 \n";
else (num1< num2)
cout<< "Number 2 is greater than number 1 \n";
return 0;
}
請張貼您的錯誤消息。 – kRiZ