fork download
  1. program Find_root
  2. implicit none
  3. integer::n,np,i
  4. do n = 2,100
  5. np=1
  6. do i = 2,n-1
  7. if(mod(n,i)==0) then
  8. np=0
  9. end if
  10. end do
  11. if(np == 1) then
  12. print *,n
  13. end if
  14. end do
  15.  
  16. end program Find_root
  17.  
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
           2
           3
           5
           7
          11
          13
          17
          19
          23
          29
          31
          37
          41
          43
          47
          53
          59
          61
          67
          71
          73
          79
          83
          89
          97