FizzBuzz: Difference between revisions
Content added Content deleted
(oberon-2) |
(→{{header|C++}}: <istream.h> is a non-standard header, and <istream> doesn't contain cout anyway; also added syntax highlighting) |
||
Line 114: | Line 114: | ||
=={{header|C++}}== |
=={{header|C++}}== |
||
<cpp> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
for (i = 0; i <= 100; i++) { |
|||
if (!(i % 15)) |
|||
cout << "FizzBuzz" << endl; |
|||
if (!(i % |
else if (!(i % 3)) |
||
cout << "Fizz" << endl; |
|||
else if (!(i % 5)) |
|||
cout << "Buzz" << endl; |
|||
else |
|||
cout << i << endl; |
|||
} |
|||
⚫ | |||
cout << i << endl; |
|||
⚫ | |||
⚫ | |||
</cpp> |
|||
⚫ | |||
⚫ | |||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |