program CAUCHY_SEQUENCE ! This is an example of Cauchy sequence. ! About the sequence, I refered to the Wikipedia. ! Concerning a program, I refered to John Burkardt's Home Page. ! Let's enjoy Fortran90. integer :: l=1, z real(kind(1Q0)) :: a, b, c, m, n, o, x, y loop_x: do write (*,*) 'Please enter X ,which is a natural number, and X<10^8.' read (*,*) x if (x.le.0) then write (*,*) 'As X is positive,',x,'is invalid.' cycle loop_x end if if (x.ne.idint(x)) then write (*,*) 'As X is an integer,',x,'is invalid.' cycle loop_x end if if (x.ge.10**8) then write (*,*) 'As X<10^8,',x,'is invalid.' cycle loop_x end if exit loop_x end do loop_x loop_n: do write (*,*) 'Please enter N ,which is a rational number. 0.1^16