- 1

How do you get a program or function to save user input information, what does the source code look like?

c++

21st Feb 2017, 12:13 AM
Jason M.
Jason M. - avatar
2 Answers
+ 6
use cin>> and variable. example: //declare variable a,b and c int a=12,b,c; cin>>b; //user input stored in b c=a+b; cout<<c; //print the result
21st Feb 2017, 1:38 AM
Agus Mei
Agus Mei - avatar
+ 1
Thanks for your idea, I will try...
28th Apr 2017, 11:27 PM
Jason M.
Jason M. - avatar