Ruby

35
1286 reads

February 26, 2013

29
1376 reads

February 26, 2013

Tax Calculator


Prompt user for a sum then calculate tax on that sum

38
1545 reads

February 26, 2013

Calculate Tax


A simple Program to calculate tax

31
1598 reads

February 26, 2013

String Evaluation


A simple program to call a function and do simple mathematical tasks

56
1589 reads

February 26, 2013

Hello Name


Basic Input Output Operation to get your name as input and print it

62
2516 reads

February 26, 2013

Print Hello World


A simple program to print Hello World.

24
1192 reads

February 8, 2013

until Statement


Ruby until Statement:

until conditional [do]
code
end

37
1162 reads

February 7, 2013

while Statement


Loops in Ruby are used to execute the same block of code a specified number of times.

Ruby while Statement:
Syntax:

while conditional [do]
code
end

31
1217 reads

February 7, 2013

Trueness of objects in Ruby


The conditional statements if and unless can also use expressions that return an object that is not either true or false.

In such cases, the objects false and nil equates to false.

23
1315 reads

February 7, 2013

unless statement


Ruby unless Statement:
Syntax:

unless conditional [then]
code
[else
code ]
end