Guest User

Untitled

a guest
Oct 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class WallPapper {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. System.out.print("Введите кол-во полос: ");
  8. Scanner s1 = new Scanner(System.in);
  9. int columns = s1.nextInt();
  10. System.out.print("Введите ширину рисунка: ");
  11. Scanner s2 = new Scanner(System.in);
  12. int width = s2.nextInt();
  13. System.out.print("Введите высоту: ");
  14. Scanner s3 = new Scanner(System.in);
  15. int height = s3.nextInt();
  16.  
  17. for (int i = 0; i < height; i++) {
  18. for(int i1 = 0; i1 < columns/2; i1++) {
  19. for(int j = 0; j < width; j++) {
  20. System.out.print("*");
  21.  
  22. }
  23. for(int j = 0; j < width; j++) {
  24. System.out.print("+");
  25. }
  26. }System.out.println();
  27. }
  28. }
  29.  
  30. }
Add Comment
Please, Sign In to add comment