mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
286 B
19 lines
286 B
11 years ago
|
/*
|
||
|
* Fizzbuzz test case.
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(int argc, char *argv[]) {
|
||
|
int i;
|
||
|
|
||
|
for (i = 1; i <= 100; i++) {
|
||
|
if ((i % 3) == 0) { printf("Fizz"); }
|
||
|
if ((i % 5) == 0) { printf("Buzz"); }
|
||
|
if ((i % 3) && (i % 5)) { printf("%d", i); }
|
||
|
printf("\n");
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|