0

Info

When you want to make a if loop then you need a variable (int...) ant the variable is in the () #include <iostream> Int main () { Int jear ; // variable cout << "Jear: " ; cin >> jear ; If ( jear == 2020) { cout << "Yes" ; } else { cout << "no" ; } }

2nd Jun 2020, 8:56 AM
Akos Szabo
Akos Szabo - avatar
2 odpowiedzi
+ 4
Akos Szabo inorder for your code to run you have to add std:: infront each cout and infront of cin... #include <iostream> int main () { int jear ; // variable std::cout << "Jear: " ; std::cin >> jear ; if ( jear == 2020) { std::cout << "Yes" ; } else { std::cout << "no" ; } }
3rd Jun 2020, 7:05 AM
BroFar
BroFar - avatar
+ 3
So what's your question?
3rd Jun 2020, 4:51 AM
$hardul B
$hardul B - avatar