+ 2
How to take input in the form of text(line) and print it?
Input in form of text line
3 Antworten
+ 6
use cin to get user input. use cout to print to screen.
i.e
#include <string>
using namespace std;
int main() {
string input;
cout << "enter text";
cin >> input;
cout << "you entered " << input;
return 0;
}
+ 5
the language you are using might help in getting a correct answer
+ 3
cin.getline(a)//say a is of int type
cout<<a;