Is it possible to use cin>> in NESTED IF loop? Or it only works if we assign value to variable ex. Int=100 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is it possible to use cin>> in NESTED IF loop? Or it only works if we assign value to variable ex. Int=100

https://code.sololearn.com/chyPQrIAq197/?ref=app

18th Jun 2017, 9:43 AM
kartik B
kartik B - avatar
5 Answers
+ 3
cin is an object belongs to C++'s standard library and as long as the scope of namespace covers all parts of your code (which is usual most of the time) you would use cin in almost everywhere of your code to get the input.
18th Jun 2017, 11:39 AM
Babak
Babak - avatar
+ 1
try this 😂😂😂 int mark = 100; if (mark) if (mark) if (mark) if (mark) for(;;) cin >> mark; return 0;
18th Jun 2017, 11:23 AM
Andrea Simone Costa
Andrea Simone Costa - avatar
+ 1
thanks@Babak Sheykhan (PERS)
18th Jun 2017, 11:41 AM
kartik B
kartik B - avatar
0
with!!
18th Jun 2017, 11:26 AM
kartik B
kartik B - avatar
0
plz give proper answer
18th Jun 2017, 11:27 AM
kartik B
kartik B - avatar