Ruby Program to Calculate the Logarithm Gamma of the Given Number

You are currently viewing Ruby Program to Calculate the Logarithm Gamma of the Given Number

Ruby program to calculate the logarithm gamma of the given number

# Ruby program to calculate the 
# logarithm gamma of the given number

print "Enter Number: ";
num = gets.chomp.to_i;  
 
result = Math.lgamma(num);

print "Result is: ",result;
Enter Number: -25
Result is: [Infinity, 1]

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply