#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main () { string myString = ""; cout<<"enter the sentence"<<endl; getline(cin,myString); myString.insert(10, 1, '\n'); myString.insert(20, 1, '\n'); myString.insert(30, 1, '\n'); myString.insert(40, 1, '\n'); myString.insert(50, 1, '\n'); myString.insert(60, 1, '\n'); cout << myString << endl; return 0; }</string></iostream>
using namespace std; int main () { string myString = ""; cout<<"enter the sentence"<<endl; getline(cin,myString); cout.width(10); cout <<myString << "\n";
cin
getline
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)