Using Ritchie as a bait for coding fizz buzz. You will rot in hell user.
>>64024127
Other urls found in this thread:
jsoftware.com
en.wikipedia.org
twitter.com
Recursive, no initialized variables.
#include
void fizzbuzz(int a, int b)
{
if (a > b)
return;
if (a % 3 == 0) {
if (a % 5 == 0)
printf("FizzBuzz\n");
else
printf("Fizz\n");
} else {
if (a % 5 == 0)
printf("Buzz\n");
else
printf("%d\n", a);
}
fizzbuzz(a+1, b);
}
int main()
{
fizzbuzz(1, 100);
return 0;
}
test
pretty sure this results in stack overflow.
>"""""incredible"""""
>""""coding""""""
>""""proweess"""""
>creates the most vulnerable language ever
ok.
It doesn't.
Very hard mode is easy with recursion.
Nowadays he runs this dodgy Trump University tier koding courses. How the mighty have fallen.
>Nowadays
>Died c. October 12, 2011 (aged 70)
V Hard mode:
#include
int n;
int fizzbuzz(int n)
{
if(n>100)
return 0;
else if(!(n%3))
printf("Fizz\n");
else if(!(n%5))
printf("Buzz\n");
else if(!(n%15))
printf("FizzBuzz\n");
else
printf("%d\n",n);
return fizzbuzz(n+1);
}
int main()
{
fizzbuzz(n+1);
}