Program with problem to compile

1

I created this program to calculate the IMC, but it does not execute completely. He asks to enter the weight and height, but does not return any results.

Could anyone tell me what's wrong?

PROGRAM Calc
 IMPLICIT NONE
 REAL :: peso, altura, mmc
 write(*,*) "Valor do peso = ? "
 read(*,*) peso
 write(*,*) "Valor do altura = ? "
 read(*,*) altura
 mmc = (peso/altura)
 write (*,*) mmc
 STOP
END PROGRAM Calc
    
asked by anonymous 30.11.2017 / 12:55

1 answer

2

Simply add a new READ at the end so it waits for a key to be pressed before closing the code.

    
30.11.2017 / 13:24