how to write algorithm to find the product of three numbers
Answers
Answered by
23
Here is how it could be implemented in Fortran 95:
program SumAndProduct
real number1, number2, number3, total, product
print *, "Enter first number"
read *, number1
print *, "Enter second number"
read *, number2
print *, "Enter third number"
read *, number3
total = number1 + number2 + number3
product = number1 * number2 * number3
print *, "The sum of the three numbers is ", total
print *, "The product of the three numbers is ", product
end program SumAndProduct
Similar questions