Programming Language Posters Dec2010
Programming Language Posters Dec2010
http://programming.dojo.net.nz/basic
FOR A = 1 TO 100 IF A MOD 15 = 0 THEN PRINT "FizzBuzz" ELSE IF A MOD 3 = 0 THEN PRINT "Fizz" ELSE IF A MOD 5 = 0 THEN PRINT "Buzz" ELSE PRINT A END IF NEXT A
First appeared in
Popular for
Major paradigms
Features
1964
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
Application Development
C
http://programming.dojo.net.nz/c
#include <stdio.h> ! int main (int argc, char** argv) { int i; for (i = 1; i <= 100; i++) { if (!(i % 15)) printf("FizzBuzz\n"); else if (!(i % 3)) printf("Fizz\n"); else if (!(i % 5)) printf("Buzz\n"); else printf("%d\n", i); } return 0; }
First appeared in
Popular for
Major paradigms
Features
1972
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
Scheme
http://programming.dojo.net.nz/scheme
(define (fizzify i) (cond ((= (modulo i 15) 0) ((= (modulo i 3) 0) ((= (modulo i 5) 0) (#t ) ) "FizzBuzz") "Fizz") "Buzz") i)
(define (fizzbuzz i) (if (<= i 100) (begin (display (fizzify i)) (display "\n") (fizzbuzz (+ i 1)) ) ) ) (fizzbuzz 1)
First appeared in
Popular for
Major paradigms
Features
1975
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
Python
http://programming.dojo.net.nz/python
for i in range(1, 101): if i % 15 == 0: print "FizzBuzz" elif i % 3 == 0: print "Fizz" elif i % 5 == 0: print "Buzz" else: print i
First appeared in
Popular for
Major paradigms
Features
1991
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
Java
http://programming.dojo.net.nz/java
public class FizzBuzz { public static void main (String[] args) { for (int i= 1; i <= 100; i++) { if (i % 15 == 0) { System.out.println("FizzBuzz"); } else if (i % 3 == 0) { System.out.println("Fizz"); } else if (i % 5 == 0) { System.out.println("Buzz"); } else { System.out.println(i); } } } }
First appeared in
Popular for
Major paradigms
Features
1995
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
Ruby
http://programming.dojo.net.nz/ruby
1.upto(100) do |n| print "Fizz" if a = (n % 3).zero? print "Buzz" if b = (n % 5).zero? print n unless (a || b) print "\n" end
First appeared in
Popular for
Major paradigms
Features
1995
Internet, Scripting
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
C#
http://programming.dojo.net.nz/c-sharp
using System; namespace FizzBuzz { class Program { static void Main(string[] args) { for (int i = 1; i <= 100; i++) { string output = ""; if (i % 3 == 0) output += "Fizz"; if (i % 5 == 0) output += "Buzz"; if (String.IsNullOrEmpty(output)) output = i.ToString(); Console.WriteLine(output); } } } }
First appeared in
Popular for
Major paradigms
Features
2001
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).
http://programming.dojo.net.nz/scratch
when set counter 100 counter counter by 1 mod 15 0.5 secs 0 clicked to 0 repeat change if say FizzBuzz for else if say else if say else say counter for 0.5 secs counter Buzz for mod 5 0.5 secs 0 counter Fizz for mod 3 0.5 secs 0
First appeared in
Popular for
Major paradigms
Features
2007
This poster is part of a series of posters about computer programming languages (http://programming.dojo.net.nz/posters-2011). Supported by the University of Canterbury Computer Science and Software Engineering (http://www.cosc.canterbury.ac.nz/). Released under the GNU Free Documentation License. Copyright 2010 Samuel Williams (http://www.oriontransfer.co.nz/).