Code:
#include <iostream>
using namespace std;
int main()
{
int playerone;
int playertwo;
cout << "Player 1, please enter '1' for Rock, '2' for Paper or '3' for Scissors and then press Enter ";
cin >> playerone;
cin.ignore();
cout << "Player 2, please enter '1' for Rock, '2' for Paper or '3' for Scissors and then press Enter ";
cin >> playertwo;
cin.ignore();
if (playerone == '1' && playertwo == '2');
{
cout << "Player two wins" << endl;
else (playerone == '1' && playertwo == '3');
cout << "Player one wins" endl;
cin.get();
}
Thanks !
Just added a } at the end, and one further up.
Fails to compile on this line:-
Code:
else if (playerone == '1' && playertwo == '3');