Skip to content

Commit

Permalink
docs(examples): add for loop and fizzbuzz examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aadhithya committed May 16, 2022
1 parent a0000b3 commit 7442ffc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
24 changes: 24 additions & 0 deletions examples/fizzbuzz.rpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
LAKSHMI START

!! declare variables
AANDAVAN SOLLRAN ix ARUNACHALAM SEIYARAN 1;
AANDAVAN SOLLRAN range ARUNACHALAM SEIYARAN 16;

NAA 1 THADAVA SONNA range THADAVA SONNA MADHRI{
EN PEAR MANICKAM ix%15==0{
DOT "FizzBuzz";
} ENAKKU INNURU PEAR IRUKKU{
EN PEAR MANICKAM ix%3==0{
DOT "Fizz";
} ENAKKU INNURU PEAR IRUKKU{
EN PEAR MANICKAM ix%5==0{
DOT "Buzz";
} ENAKKU INNURU PEAR IRUKKU{
DOT ix;
}KATHAM KATHAM;
}KATHAM KATHAM;
}KATHAM KATHAM;
ix BHAJJI SAAPDU ix + 1;
!! End Loop
}KATHAM KATHAM;
MAGIZHCHI
12 changes: 12 additions & 0 deletions examples/for_loop.rpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LAKSHMI START
!! for loop example
DOT "For Loop Example";
AANDAVAN SOLLRAN x ARUNACHALAM SEIYARAN 5;
DOT "Before loop: X =" x;
DOT "Running loop from 1...10";
NAA 1 THADAVA SONNA 10 THADAVA SONNA MADHRI{
x BHAJJI SAAPDU x + 1;

}KATHAM KATHAM;
DOT "After loop: X =" x;
MAGIZHCHI

0 comments on commit 7442ffc

Please sign in to comment.