lib/HelloWorldFizzBuzz/sqlite.rb in HelloWorldFizzBuzz-0.2.0 vs lib/HelloWorldFizzBuzz/sqlite.rb in HelloWorldFizzBuzz-0.3.0
- old
+ new
@@ -22,10 +22,30 @@
# populate the table
## Add hello-world && fizz-buzz examples Below (In Alphabetic Order)
### A
-
+@posts.insert(language: 'ada',
+ helloworld: "with Text_IO;
+procedure Hello_World is
+ begin
+ Text_IO.Put_line('Hello World!');
+ end Hello_World;
+",
+ fizzbuzz: "procedure FizzBuzz( X : Natural ) is
+ function FB( I : Integer ) return String is
+ (if I mod 15 = 0 then 'FizzBuzz'
+ elsif I mod 5 = 0 then 'Buzz''
+ elsif I mod 3 = 0 then 'Fizz'
+ else ""
+ );
+begin
+ for I in 1..X loop
+ Ada.Integer_Text_IO.Put ( I );
+ Ada.Text_IO.Put ( ' ' & FB(I) );
+ Ada.Text_IO.New_Line;
+ end loop;
+end FizzBuzz;")
### B
### C
### D