Why doesnt this code allow me to put an input? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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