Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- public class Main {
- public static void main(String[] args) {
- int x = 3;
- while (x > 0) {
- String y = (x == 1 ? "бутылка" : "бутылки");
- System.out.println(x + " " + y + " пива на стене");
- System.out.println(x + " " + y + " пива.");
- System.out.println("Возьми одну.");
- System.out.println("Пусти по кругу.");
- System.out.println();
- x = x - 1;
- }
- System.out.println("нет бутылок пива на стене");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement