Ruby Program to Find the Value of E^Value Using Exp() Function

You are currently viewing Ruby Program to Find the Value of E^Value Using Exp() Function

Ruby program to find the value of e^value using exp() function

# Ruby program to find the value of 
# e^value using exp() function

print "Enter number: ";
num = gets.chomp.to_f;  

result = Math.exp(num);
print "Result: ",result;
Enter number: -0.9
Result: 0.4065696597405991

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