RosettaCodeData/Task/Conditional-structures/RLaB/conditional-structures-3.rlab

13 lines
201 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
if (x==1)
{
// do something if x is 1
y = const.pi;
else if (x == 2)
{
// do something if x is 2
y = sin(const.pi*(1-x)) / (1-x);
else
// do something in all the other cases
y = rand();
}}