Why doesnt this code allow me to put an input? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Why doesnt this code allow me to put an input?

#include <iostream> using namespace std; int main() { int a; cout << "Enter"; cin << a; cout << a; return 0; }

5th Jun 2017, 1:09 AM
koala 🐨
koala 🐨 - avatar
2 ответов
+ 5
cin has the << the wrong way around. it should be cin >> a;
5th Jun 2017, 1:12 AM
jay
jay - avatar
5th Jun 2017, 1:14 AM
jay
jay - avatar