Hello everyone
today our leaning topic is out and input standard and we are try to know how to use this standerd in our program and what are the rule of these standard so lets start.
First we talk about input standard then we move onput standard.
input standard:
we know that A program may need certain input from the user for working properly. the term standard input refers to the input using keyboard.
C++ uses different streams tp perform input and out put operation. A stream is define as a flow of data
for input we use this syntax;
syntax
cin>>variable name;
output variable
output stanserd refer to output displayed on monitor.C++ uses the stream object to display standard output, the world "cout' stand for console outout.now we talk about his syntex.
syntex
cout<<Variable/constant/any expression
-------------------------------------------
exemple : we are try to display a massage on screem "my-love-pakistan"
now we run this program and check its working:
you can see that it work properly and my love pakistan is shown on screen.
another example where we add to number.
the procedure is this first we declare to variable and show on screen,
now we compile it
ex
#------------------------------