Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to declare input and output statement in c++

0 votes
asked Aug 9, 2018 by Kokila Verma (120 points)

2 Answers

0 votes
answered Aug 10, 2018 by metal gamer (560 points)
using cout<< for display("" in this double quotes you can display  anything) .

for an example

cout<<"hey!! how r you\n";

cin>> for input a value
0 votes
answered Aug 11, 2018 by Kevin Pham (140 points)

Make sure you include the following header:

#include <iostream>

using namespace std;

Then you can utilize the statements:

cout << "String here" << endl;

cout << "endl breaks the line!";

and

cin >> variableName;

for storing values from keyboard input/buffer into variables. 

Note:  c-out = "console output" and c-in = "console input"

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...