0
how we can get info from the user?(input)
2 odpowiedzi
+ 1
there are several ways...
but first you need to know what do you want from the user?
you take a single variable like this
cin>>(variable name);
if you want to take multiple input then
cin>>(var 1)>>(var 2)>>..... (var n);
if you want to take a string inuput then you can use cin the same way as above
but there are some functions also, like
gets (var-name);
getline (var-name);
....etc
ther is a function that can also take input of any datarype
scanf ();
do a google search on it
as kain says...scanf () is a c function so you may not focus on learning it but you can use it in c++.
0
Mukul: scanf is C, not C++.