Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class WallPapper {
- public static void main(String[] args) {
- System.out.print("Введите кол-во полос: ");
- Scanner s1 = new Scanner(System.in);
- int columns = s1.nextInt();
- System.out.print("Введите ширину рисунка: ");
- Scanner s2 = new Scanner(System.in);
- int width = s2.nextInt();
- System.out.print("Введите высоту: ");
- Scanner s3 = new Scanner(System.in);
- int height = s3.nextInt();
- for (int i = 0; i < height; i++) {
- for(int i1 = 0; i1 < columns/2; i1++) {
- for(int j = 0; j < width; j++) {
- System.out.print("*");
- }
- for(int j = 0; j < width; j++) {
- System.out.print("+");
- }
- }System.out.println();
- }
- }
- }
Add Comment
Please, Sign In to add comment