Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Fortran program to calculate the area of a triangle with 3 sides. To do this, your program should consist of following major steps:
Write a Fortran program to calculate the area of a triangle with sides. To do this, your program should consist
of following major steps:
ask the user to the sides of a triangle via keyboard entry,
Check whether the entered sides can make a triangle. If the entered sides cannot make a triangle, an error
message should be printed on the screen. To form a triangle, each side must be shorter than the sum of the other
two sides.
calculates the area of the triangle based on this formulation,
prints the area of the triangle on the screen.
Sample Run :
This program calculates the area of a triangle with sides.
Enter the length of the first side in meters.
Enter the length of the second side in meters.
Enter the length of the third side in meters.
The entered sides cannot make a triangle.
Sample Run :
This program calculates the area of a triangle with sides.
Enter the length of the first side in meters.
Enter the length of the second side in meters.
Enter the length of the third side in meters.
The area of the entered triangle is squared meters.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started