+ 1

Why this program not run ?

I am trying make a C++ program But not run. Do you know false in this program https://code.sololearn.com/cvPI2IwHDjKB/?ref=app

25th Apr 2017, 7:15 AM
Fauzi Pratama
Fauzi Pratama - avatar
11 Respuestas
+ 7
You declared your variable like this "Value" but used it like this "value". Remember, cpp is case sensitive. Change it to "int value;" And the second problem is that you wrote "cin<<value;" change that to "cin>>value;"
25th Apr 2017, 7:21 AM
Tim G
Tim G - avatar
+ 6
//Let's try this code #include <iostream> using namespace std; int main(){ int Value; cout<<"Enter your value: "; cin>>value; //You have an error, you use wrong sign. ('>>' are correct) if(value>75) { cout<<"Congratulation\n"; } else { cout<<"Sorry\n"; } return 0; }
25th Apr 2017, 7:22 AM
Nithiwat
Nithiwat - avatar
+ 6
You didn't change cin<<value; to cin>>value;
25th Apr 2017, 7:24 AM
Tim G
Tim G - avatar
25th Apr 2017, 7:26 AM
Tim G
Tim G - avatar
+ 6
Np, you're welcome(:
25th Apr 2017, 7:29 AM
Tim G
Tim G - avatar
+ 5
cin>>value;
25th Apr 2017, 7:20 AM
Nithiwat
Nithiwat - avatar
25th Apr 2017, 7:23 AM
Nithiwat
Nithiwat - avatar
25th Apr 2017, 8:48 AM
Nithiwat
Nithiwat - avatar
+ 3
but it say "compilation error" please you try.
25th Apr 2017, 7:23 AM
Fauzi Pratama
Fauzi Pratama - avatar
+ 3
@Nithiwat your program error too
25th Apr 2017, 7:25 AM
Fauzi Pratama
Fauzi Pratama - avatar
+ 3
@ Tim G. Thanks for your help
25th Apr 2017, 7:27 AM
Fauzi Pratama
Fauzi Pratama - avatar