program round_3rd_digit implicit none real a, sign, positive_a write(*,*) 'Please type in a real number:' read(*,*) a sign = a/sqrt(a**2) positive_a = sign * a call round3(positive_a) a = sign * positive_a write(*,*) write (*,*) 'The rounded value is:', a write (*,100) a 100 format ('We can print it as', F20.2) end subroutine round3(positive_a) implicit none integer n, m real positive_a, b positive_a = positive_a * 1000 n=int(positive_a) m=mod(n,10) if (m>4) then n=n-m+10 else n=n-m end if n=n/10 c positive_a = real(n)/100 positive_a = n/100.0 end