私は楽しみのためにこれを書いていました:
#include <iostream>
#include <cstdlib>
using namespace std;
int Arsenal = rand()%3;
int Norwich = rand()%3;
int main () {
if (Arsenal > Norwich) {
cout << "Arsenal win the three points, they are in the Top Four";
return 0;
} else if (Arsenal == Norwich) {
cout << "The game was a draw, both teams gained a point";
return 0;
} else (Norwich > Arsenal) {
cout << "Norwich won, Arsenal lost";
return 0;
}
}
g ++でコンパイルしようとしましたが、次のエラーが発生します。
arsenalNorwich.cpp: In function, 'int main'
arsenalNorwich.cpp:15:30: error: expected ';' before '{' token
私は何が間違っていたのかわかりませんし、私の学校の CS チューターもそうではありません。それはただの楽しみのためですが、それは私を夢中にさせています.