The cin command | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

The cin command

Basically I've been replacing int x = 4; with int x; cin >> x So its easier to try different inputs instead of constantly having to change code

18th Oct 2016, 5:10 PM
Joshua Nivens
Joshua Nivens - avatar
2 Answers
+ 1
I don't think this is a good idea, when you start making big programs stuff like this might confuse you or override some values
22nd Oct 2016, 12:30 PM
imaqtpie - avatar
It's better to assign 0 for int type. Like this int x=0;
15th Feb 2017, 11:46 PM
Jomel N. Barrinuevo
Jomel N. Barrinuevo - avatar