@Absinthe

Took 7 minutes to write the code in C.

<stdio.h>

int main(){
for(int i = 99; i > 0; i--){
if(i > 1){
printf("%d bottles of beer on the wall, %d bottles of beer.\n", i, i);
printf("Take one down, pass it around.\n");
}
else{
printf("%d bottle of beer on the wall, %d bottle of beer.\n", i, i);
printf("Take one down, pass it around.\n");
}
}
printf("No more bottles of beer on the wall, no more bottles of beer.\n");
printf("There's nothing else to fall, because there's no more bottles of beer on the wall.\n");
}

@paleBlue Did you miss that the goal was to have the numbers as text e.g. "Ninety-nine"?

Follow

@Absinthe @paleBlue if you use number instead of text, this would be a walk in the park.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.