1. import java.util.Scanner;
  2. 
  3. /**
  4. * Lab2.java
  5. * @author Jose M Vidal <jmvidal@gmail.com>
  6. * Created on Jan 30, 2012
  7. *
  8. */
  9. 
  10. public class Lab2 {
  11. 
  12. /**
  13. * @param args
  14. */
  15. public static void main(String[] args) {
  16. Scanner keyboard = new Scanner(System.in);
  17. System.out.print("Enter word:");
  18. String word = keyboard.next();
  19. for (int row = 0; row < 10; row++) {
  20. for (int col = 0; col < 40; col++) {
  21. System.out.print(word.charAt(((row * 40) + col) % word.length()));
  22. }
  23. System.out.println("");
  24. }
  25. }
  26. 
  27. }