面试题答案
一键面试program find_max
implicit none
integer :: a, b, c, max_value
! 从键盘读取三个整数
write(*,*) '请输入三个整数:'
read(*,*) a, b, c
! 找出最大值
if (a >= b) then
if (a >= c) then
max_value = a
else
max_value = c
end if
else
if (b >= c) then
max_value = b
else
max_value = c
end if
end if
! 输出最大值
write(*,*) '这三个数中的最大值是:', max_value
end program find_max