0
Can anyone tell me why this code isnt working?
#include <iostream> using namespace std; int main() { int yourScore; cout << " Please input your score\n"; cin << yourScore; if (yourScore >69) { cout << " you passed.\n"; } else { cout << " you failed.\n"; } return 0; } I'm very new at this and i can't seem to figure this out. Every time I run it the console says compiler error.
3 Respuestas
+ 4
check your cin
the arrows should point into the variable
cin >> yourScore;
when in doubt, ask yourself:
do i need to put data into (>>) or get the data from (<<)
0
Chage cin << yourScore to cin >> yourScore
0
Because after cin you have use << instead it use >>...