integer wb write(*,*) 'Input your height(cm)?' read(*, *) h write(*,*) 'Input your weight(cm)?' read(*, *) w h = h / 100. bmi = w / h ** 2 wb = 22. * h ** 2 write(*, 100) bmi 100 format('your BMI value is ', f4.1) write(*, *) 'i think' if(bmi.lt.20.) then write(*, *) 'eat more!' else if(bmi.ge.20..and.bmi.lt.24.) then write(*, *) 'no problem' else if(bmi.ge.24..and.bmi.lt.26.5) then write(*, *) 'you need attention' else write(*, *) '...' end if write(*, *) 'your best weight is', wb, 'kg' end