>it says here that you can't do fizzbuzz without if else statements
>care to explain this?
It says here that you can't do fizzbuzz without if else statements
kys?
10 print "fizz"
wait 4
beep
print "buzz"
goto 10
fortran?
switch...
You mean like this one?
Easy, I lack experience.
That'S why I code in my free time, too.
So could you please leave me alone, so I can continue being a miserable pile of secrets?
./fizzbuzz.sh
Looks like basic desu senpai
i can tell from some of the pixels and the fact that print statements aren't formatted like that in fortran
How long has she been on HRT? I want to be a tech emo girl too.
(defun shiggylicious (n)
(dotimes (i n)
(format t "~%~:[~d~:;~:*~{~c~^~}~]"
(append (and (zerop (rem i 3)) (coerce "fizz" 'list))
(and (zerop (rem i 5)) (coerce "buzz" 'list)))
i)))
>she
>girl
I'd totally cover her dick in hershey's and suck on that feminine penis
# include
int main ( ) {
int i=0;
A: ++i;
if (i - (i/3)*3 != 0)
{
goto B;}
printf("Fizz");
B: if (i-(i/5)*5 != 0)
{
goto C;}
printf("Buzz");
C:
if (i-(i/3)*3 !=0 && i-(i/5)*5!=0)
{
printf("%d", i);}
printf("\n");
if (i
I can do it just with if statements.
You're using if else
Heh
x=cellstr(int2str((1:100)'));
x(3:3:end)=cellstr('Fizz');
x(5:5:end)=cellstr('Buzz');
x(15:15:end)=cellstr('FizzBuzz');
fprintf('%s\n',x{:});
>statement
EVRYTHING IS AN EPXPRESSSION YOU WHORE
public static void main(String[] args){
for(int i = 1; i
That's literally just a shorthand if else statement.
switch (i % 3) {
case 0: {
switch (i % 5) {
case 0: {
// Fizzbuzz
}
default: {
// Fizz
}
}
}
default: {
switch (i % 5) {
case 0: {
// Buzz
}
default: {
// Number
}
}
}
}
Just use a visitor design pattern.
#include
static void num (int n) { printf("%d\n", n); }
static void fizz () { printf("Fizz\n"); }
static void buzz () { printf("Buzz\n"); }
static void fizzbuzz () { printf("Fizzbuzz\n"); }
int main (int argc, char *argv[]) {
void (*fp[4])(int n) = {num, fizz, buzz, fizzbuzz};
for (int i = 1; i
How big is Pistol's pistol?
That's actually pretty cool. Forgot you could do that range selection in Python.
for i in xrange(1,100): print 'FizzBuzz'[4*(i%3>0):8-4*(i%5>0)] or i