Area of a Triangle

Write Ruby program which uses Math module to find area of a triangle.
areaOfTriangle.rb
print("Enter a,b,c values:\n")
a = gets.to_f
b = gets.to_f
c = gets.to_f
if(a<0||b<0||c<0||a+b<=c||a+c<=b||b+c<=a)
print("Not a valid triangle.")
else
s = (a+b+c)/2
area = Math.sqrt(s*(s-a)*(s-b)*(s-c))
print("Area of a triangle is #{area}")
end
INPUT1
Enter a,b,c values:
5
4
7
OUTPUT1
Area of a triangle is 9.797958971132712
INPUT2
Enter a,b,c values:
5
4
9
OUTPUT2
Not a valid triangle.