Skip to content

Commit

Permalink
adding the sample programs
Browse files Browse the repository at this point in the history
  • Loading branch information
Suloch committed Aug 15, 2018
1 parent a858295 commit 66d180d
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 0 deletions.
12 changes: 12 additions & 0 deletions samplePrograms/add.rocks
@@ -0,0 +1,12 @@

(Program to add two numbers)
(Author : Suloch)

(Initializes 'Everything' with 352364)
Everything is the choice of the steins gate

(Initializes 'The Organisation' with 7238)
The Organisation was created by the commitee

(prints on stdin after adding 'Everything' with 'The organisation')
Say Everything with The Organisation
15 changes: 15 additions & 0 deletions samplePrograms/factorial.rocks
@@ -0,0 +1,15 @@

(Program to calclate factorial for a number recrusively)
(Author : Suloch)


Everyone takes the bait
If the bait is nothing
Put nobody into the chaos
Build the chaos up
Else
Put the bait of Everyone taking the bait without 1 into the chaos

Give back the chaos

Say Everyone taking 6
19 changes: 19 additions & 0 deletions samplePrograms/fibonacci.rocks
@@ -0,0 +1,19 @@

(Program to print first 11 fibonacci numbers)
(Author : Suloch)

Put nothing into my words
my promises were lies
my truth was too
Put my promises without my truth into my life
Put my life into my promises
the thought was benevolent
Whisper my promises
Until the thought is higher than nothing
Whisper my promises
Put my life into my words
Put my promises into my life
Put my life with my words into my promises
Knock the thought down

(End of Program)
4 changes: 4 additions & 0 deletions samplePrograms/helloWorld.rocks
@@ -0,0 +1,4 @@

(Prints "Hello, World!" to stdin)
(Author : Suloch)
Say "Hello, World!"
13 changes: 13 additions & 0 deletions samplePrograms/modulus.rocks
@@ -0,0 +1,13 @@

(program to find modulus using user defined function)
(Author : Suloch)

Midnight takes your heart and your soul
While your heart is as high as your soul
Put your heart without your soul into your heart

Give back your heart

Darkness was alone
Silence was haunting
Whisper Midnight taking Silence, Darkness
32 changes: 32 additions & 0 deletions samplePrograms/prime.rocks
@@ -0,0 +1,32 @@

(program to check a number is prime or not. using 17 in the example)
(Author : Suloch)

(function to calculate modulus)
Desperation takes your hopes and your failure
While your failure is as weak as your hopes
Put your hopes without your failure into your hopes

Give back your hopes


my fear was a saplin
Say my fear
Put nothing into my choices
Build my choices up
Build my choices up
Put my choices into your will
Put right into the fears
While my choices is weaker than my fear over your will
If Desperation taking my fear, my choices is nothing
Put lies into the fears
Break it down

Build my choices up

If the fears is true
Shout "Prime"
Else
Shout "Nope"

(End)

0 comments on commit 66d180d

Please sign in to comment.