Do each program have a multiple number of input and output )
Answers
Answered by
1
Answer:
The answer depends. A program can be input free, but there must be an output to be displayed or a task to be performed.
Explanation:
Consider a program of adding two number that you know previously. Let us say 2 and 3. Then you have not take an input, you just need to print their sum.
cout<<2+3;
But what if you don't know the numbers, and want user to enter them at the time of program run. Then you have to take input as well as print output.
int x,y;
cin>>x,y;
cout<<x+y;
Thats all. Cheers!
Similar questions