Ruby
xxxxxxxxxx
print "Enter number: ";
num = gets.chomp.to_i;
case num
when 1
puts "Input is 1";
when 2
puts "Input is 2";
when 3
puts "Input is 3";
when 4
puts "Input is 4";
when 5
puts "Input is 5";
else
puts "Unknown number";
end
Enter number: 5 Input is 5
Linux - How to Install anc-api-tools
Linux - How to Install curvedns
Linux - How to Install zenmap
Python - Check if a Number is Positive, Negative or 0
C - Count Number of Digits in an Integer
C - Find Largest Number Using Dynamic Memory Allocation
Python - Writing Excel (XLSX) Files
Kotlin - Reverse a Number
C++ - Check Whether a Number is Prime or Not
Kotlin - Find Factorial of a Number
Linux - How to Install zstd
JavaScript - Check Whether a String Starts and Ends With Certain Characters
Python - Bubble Sort
C++ - Find Quotient and Remainder
Linux - How to Install xbitmaps
C++ - Check Leap Year
Kotlin - Round a Number to n Decimal Places
Java - Reverse a Number
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month