djelad1

Untitled

Dec 9th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 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. strcpy_s(text[0], text[LINES]);
  7. for (i = LINES; i >= 0; i--)
  8. {
  9. strcpy_s(text[i], text[i-1]);
  10. }
  11.  
  12. cout << "your new text is :\n";
  13. for(i = 1; i <= LINES; i++)
  14. cout << text[i] << endl;
  15. break;
  16. system("pause");
  17. system("cls");
Advertisement
Add Comment
Please, Sign In to add comment