lib/HelloWorldFizzBuzz/sqlite.rb in HelloWorldFizzBuzz-0.4.0 vs lib/HelloWorldFizzBuzz/sqlite.rb in HelloWorldFizzBuzz-0.5.0
- old
+ new
@@ -58,12 +58,40 @@
40 IF FN M(3) = 0 THEN O$ = 'FIZZ'
50 IF FN M(5) = 0 THEN O$ = O$ + 'BUZZ'
60 IF O$ = "" THEN O$ = STR$ (A)
70 PRINT O$
80 NEXT A
-"
+")
### C
+@posts.insert(language: 'C',
+ helloworld: "#include<stdio.h>
+main()
+{
+ printf('Hello World');
+
+
+}
+",
+ fizzbuzz: "#include <stdio.h>
+
+int main(void)
+{
+ int i;
+ for(i=1; i<=100; ++i)
+ {
+ if (i % 3 == 0)
+ printf('Fizz');
+ if (i % 5 == 0)
+ printf('Buzz');
+ if ((i % 3 != 0) && (i % 5 != 0))
+ printf('number=%d', i);
+ printf('\n');
+ }
+
+ return 0;
+}
+")
### D
@posts.insert(language: 'dart',
helloworld: "void main() {
print('hello world!');
}