FizzBuzz Solution Dumping Ground
No Powershell yet? With use of arrays for the lack of the ternary operator in Powershell (using the behaviour of Powershell returning $null for any non-existing array members, and that the Modulo...
View ArticleFizzBuzz Solution Dumping Ground
for(let i = 1; i<101; i++){ if(i % 3 === 0){ if(i % 5 === 0){ console.log("fizzbuzz"); } else{ console.log("fizz"); } } else if(i % 5 === 0) {console.log("Buzz");} else{console.log(i)}; } Read full...
View ArticleFizzBuzz Solution Dumping Ground
I want to thank you for the head start on the version that I copied from you! ; FILE: fizzbuzz.asm ; Author: David Billsbrough ; influenced by Matt_Giuca version of Feb '07 ; Revised: Monday,...
View ArticleFizzBuzz Solution Dumping Ground
public static void fizzFuzzer(int max) { /* this is a * multi-line comment*/ /* a pattern of numbers. * its actually the difference between * adjcent sorted multiples. their sum is not above max...
View ArticleFizzBuzz Solution Dumping Ground
for i in range(1,101): if i%3==0 and i%5==0: print("Fizzbuzz") elif i%3==0: print("Fizz") elif i%5==0: print("buzz") else: print(i) Read full topic
View ArticleFizzBuzz Solution Dumping Ground
I don’t think anyone has used BASIC yet (Oops! Wrong - see message 275, which I can’t link to because I am a new user - Apologies to Mark_Smith1… and Hugh_Fokker post 256. Sigh - and quite a few...
View ArticleFizzBuzz Solution Dumping Ground
A late entry for GameMaker, with something they call ‘commenting’ and some ‘color’. Could be made more efficient but I was going for speed and clarity: //DRAW STEP var pos_x = 20; var pos_y = 5; var...
View ArticleFizzBuzz Solution Dumping Ground
Someone decided (in a fit of self mutilation) to optimize fizzbuzz using assembly: fastest code - High throughput Fizz Buzz - Code Golf Stack Exchange Read full topic
View ArticleFizzBuzz Solution Dumping Ground
Many have done it, now it’s my turn… <?php for ($i=1; $i<=100; $i++) { $string = ''; $string = $i%3==0 ? $string.'Fizz' : $string; $string = $i%5==0 ? $string.'Buzz' : $string; $string = $string...
View ArticleFizzBuzz Solution Dumping Ground
Java Solution class Main { public static void main(String[] args) { int i = 0; while (i != 101) { if ((i % 3 == 0)&(i % 5 != 0)){ System.out.println("Fizz"); } else if ((i % 3 != 0)&(i % 5 ==...
View ArticleFizzBuzz Solution Dumping Ground
Thank you for liking my code. I also wrote two different paper, scissors, rock program but was difficult at the start and abstract but I put mind to work and think and think with music. I am a...
View ArticleFizzBuzz Solution Dumping Ground
for num in range(1,100): if num % 3 == 0: print("Fizz", num) elif num % 5 == 0: print("Buzz", num) elif num % 3 == 0 and num % 5 == 0: print("FizzBuzz", num) elif num % 1 == 0: print("Prime", num)...
View ArticleFizzBuzz Solution Dumping Ground
Surprised nobody has posted this here yet… Coding in Stenography, Quick Demo Read full topic
View ArticleFizzBuzz Solution Dumping Ground
I tried this simple code for number in range(101): if number%15 == 0 : print("FizzBuzz") elif number%5 == 0: print("Buzz") elif number%3 == 0: print("Fizz") else: print(number) Read full topic
View ArticleFizzBuzz Solution Dumping Ground
Well I read the article and knew I had to dump my JS solution for it var i; for (i = 1; i < 101; i++) { if((i%3==0) && (i%5==0)) { console.log("FizzBuzz"); } else if(i%3==0) {...
View ArticleFizzBuzz Solution Dumping Ground
Surprised no one posted this efficient solution so far. I’ll post it in PHP I guess, but the concept works in most languages. function FizzBuzz($limit = 100, $FizzMultiple=3, $BuzzMultiple=5){...
View ArticleFizzBuzz Solution Dumping Ground
And since no one seems to have picked MUMPS in thirteen years of responses: F I=1:1:100 W !,$S(I#15=0:"Fizzbuzz",I%3=0:"Fizz",I%5=0:"Buzz",1:I) Read full topic
View ArticleFizzBuzz Solution Dumping Ground
In java, but in functional paradigm (don’t do this at work). public static void main(String[] args) { final String result = IntStream .rangeClosed(1, 100) .mapToObj(Scratch::fizzBuzz)...
View Article