러스트로 간단하게 별찍기 문제 풀었는데 파이썬이랑은 다르게 repeat()이란 함수란 게 있어서 신기했음...

# Python starrrrrrrs
for i in range(1, 4):
    print("*"*i)
// Rust starrrrrs
fn main() {
    for _i in 1..4 {
        println!("{}", "*".repeat(_i))
    }
}
1

❤️

1 person reacted.

Hi, I'm who's behind Fedify, Hollo, BotKit, and this website, Hackers' Pub! My main account is at @hongminhee洪 民憙 (Hong Minhee).

Fedify, Hollo, BotKit, 그리고 보고 계신 이 사이트 Hackers' Pub을 만들고 있습니다. 제 메인 계정은: @hongminhee洪 民憙 (Hong Minhee).

FedifyHolloBotKit、そしてこのサイト、Hackers' Pubを作っています。私のメインアカウントは「@hongminhee洪 民憙 (Hong Minhee)」に。