Electrical and Computer Engineering
1 of 37
UAH
CPE 112
Getting Data Into Programs
•An advantage of programs is that they can be run many times using different sets of data.
•A program must have some way of reading the data (this is called input).
•An input stream is an endless sequence of characters coming into your program.
•cin is associated with the standard input device (keyboard). It has the extraction operator >>.
•The extraction operator >> takes two operands, cin and a variable.