previous | start | next

These programs would be more useful if the user was able to input the values rather than having them "hard coded".

The extraction operator, >> is part of the C++ I/O library and is used to read input.

This operator is also a binary operator. Its left operand should be of type istream - an input stream. It can be associated either with a file or with the keyboard input.

The right operand should be a variable that can recieve a value from the input. The input is first read as a sequence of characters and then converted to the type of the right operand variable.



previous | start | next