Asked by EDWIN

WRITE A SIMPLE BUT A COMPLETE FORTRAN PROGRAM TO CALCULATE THE AREA OF A TRIANGLE

Answers

Answered by PsyDAG
Indicate your specific subject in the "School Subject" box, so those with expertise in the area will respond to the question.

Second, please do not use all capitals. Online it is like SHOUTING. Not only is it rude, but it is harder to understand. Thank you.
Answered by MathMate
It would be something like this:

WRITE(6,*)'INPUT Base and Height='
READ(5,*)B,H
AREA=B*H/2.0
WRITE(6,*)'AREA OF TRIANGLE IS ',AREA
STOP
END

Most (old) compilers would require the first 6 characters to be blank in the above program.

STOP is for execution time termination.
END is for compiler to know that this is the end of the subroutine, function or main program.

You can do the other program(s) in a similar way.
Answered by EDWIN
@psydag, sorry for shouting

@mathmate, thanks for the solution

thank you

edwin
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions