djelad1

Untitled

Dec 6th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. char text[LINES][MAX_LETTERS2];
  2. int i = 0;
  3. cout << "Please fill text 1 with " << LINES << " lines and max " << MAX_LETTERS2-1 << " letters : " << endl;
  4. for (i = 0; i < LINES + 1; i++)
  5. cin.getline(text[i], MAX_LETTERS2);
  6. for (i = 2; i <= LINES+1; i++)
  7. {
  8. strcpy_s(text[0], text[4]);
  9. strcpy_s(text[i], text[i - 1]);
  10. }
  11. cout << "your new text is :\n";
  12. for(i = 1; i <= LINES; i++)
  13. cout << text[i] << endl;
Advertisement
Add Comment
Please, Sign In to add comment