jaVer404

level04.lesson10.task04

Mar 30th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. package com.javarush.test.level04.lesson10.task04;
  2.  
  3. /* S-квадрат
  4. Вывести на экран квадрат из 10х10 букв S используя цикл while.
  5. Буквы в одной строке не разделять.
  6. */
  7.  
  8. public class Solution
  9. {
  10.     public static void main(String[] args) throws Exception
  11.     {
  12.         //Напишите тут ваш код
  13.         int i1 = 0;
  14.         int i2 = 0;
  15.         while (i1<10) {
  16.             while (i2<10) {
  17.                 System.out.print("S");
  18.                 i2++;
  19.             }
  20.             System.out.println();
  21.             i2=0;
  22.             i1++;
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment