Input Using Cin
Input Using Cin
Cin is a predefined object that represents the standard input steam in c++. The standard input steam
represent the keyboard. The general format is
Hence variable 1, variable 2,------,variable N are valid C++ various names that have been already
declared. The operator >> is known as extraction or get from operator. It takes the value from the
keyboard and assign to the variable on its right as shown in figure 2.5 (for the statement cin >> n)