Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program main
- implicit none
- real(8),parameter :: pi = 3.1415926535897932384626433832795
- ! number in list
- integer, parameter :: i = 10
- integer :: p,s
- do while (.true.)
- write (0,fmt = '(a$)') 'Enter p: '
- read (*,*) p
- write (0,fmt = '(a$)') 'Enter s: '
- read (*,*) s
- if ( (s <= 0) .or. (p <= 0) ) then
- exit
- end if
- write (0,fmt = '(a,i1,a,i1,a,f3.0,/)') &
- 'Cost a road from: ',p,' to ',s,' : ', aint( 6.0d0 + cos( pi/15*(i + 4*p + s ) )*5.0d0 )
- end do
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement