cout <<"Welcome to the Computer Language";
This causes the string in quotation marks to be displayed on screen.
'cout' is a predefined object that represents standard output stream i.e. screen.
The operator '<<' is called as insertion or put to operator.It inserts the contents of the variable on its right to the object on its left.
Input Operator :
cin >> no;
It is an input statement and causes the programs to wait for the user to type in a number.The number keyed in is placed in the variable 'no'.
'cin' is predefined object that represents standard input stream i.e. keyboard.
The operator '>>' is know as extraction or get from operator.
It extracts or takes the value from the keyboard and assigns it to the variable on its right.
This causes the string in quotation marks to be displayed on screen.
'cout' is a predefined object that represents standard output stream i.e. screen.
The operator '<<' is called as insertion or put to operator.It inserts the contents of the variable on its right to the object on its left.
Input Operator :
cin >> no;
It is an input statement and causes the programs to wait for the user to type in a number.The number keyed in is placed in the variable 'no'.
'cin' is predefined object that represents standard input stream i.e. keyboard.
The operator '>>' is know as extraction or get from operator.
It extracts or takes the value from the keyboard and assigns it to the variable on its right.
0 Comments:
Post a Comment