CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Help please
// i keep getting compilation errors//
#include <iostream>
using namespace std;
int main()
{
int Password[2] = {2,4};
int x;
int y;
cin >> x;
// wrong way here
cin >> y;
// use >> not <<
if (x == Password[0] && y == Password[1]) //need to use == to compare values
{
cout << "correct password" << endl;
}
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run