99병의 맥주3 [Rust] 99병의 맥주 fn main() { print!("99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall.\n"); for i in (1..99).rev() { if i == 2 { print!("2 bottles of beer on the wall, 2 bottles of beer. Take one down and pass it around, 1 bottle of beer on the wall.\n"); } else { print!("{} bottles of beer on the wall, {} bottles of beer. Take one down and pass.. 2022. 6. 23. [Swift & Go] 99병의 맥주 import Foundation print("99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall.") for i in (2...98).reversed() { if(i==2) { print("2 bottles of beer on the wall, 2 bottles of beer. Take one down and pass it around, 1 bottle of beer on the wall.") } else { print(i, "bottles of beer on the wall,", i, "bottles of beer. Take one down and.. 2022. 6. 21. [C++ & Java] 99병의 맥주 #include "stdio.h" void main() { printf("99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall.\n"); for (int i = 98; i > 1; i--) { if (i == 2) { printf("2 bottles of beer on the wall, 2 bottles of beer. Take one down and pass it around, 1 bottle of beer on the wall.\n"); } else { printf("%d bottles of beer on the wall, %d bottles of.. 2022. 1. 21. 이전 1 다음