Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char str[1000];
- int i = 0;
- n[i] = getchar();
- while (n[i] != 'n') {
- i++;
- n[i] = getchar();
- }
- string s = str;
- string s;
- getline(cin,s);
- string s(str, i);
- i++;
- str[i] = '