|
You must have read printf
and scanf statements in C language. One
prints the output on screen and the other
scans what you entered.
The standard C++ library
includes the header file iostream, where the
standard input and output stream objects are
declared. In CPP ,
cout prints on the screen whereas
cin scans, similar to printf,scanf in c
language. In the
above program integer type variable v is
scanned and 5 is added to it and the result
is printed on the screen.
For e.g if you add 5 as value
in the program above it will output as:
Enter a value: 5
The
value you entered is 5 and adding five
to it makes it 10 . |