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

13 lines
201 B
Plaintext

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();
}}