Entering a number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Entering a number

How do I enter a number with the "cin" programs

24th Dec 2018, 12:38 AM
Ethan
1 Answer
+ 2
You have to declare a variable that will hold the number and after you use the cin command, like this: int x; cin >> x; //then you can print the number if u want cout << x ;
24th Dec 2018, 1:47 AM
Sekiro
Sekiro - avatar