program main
    implicit none
    integer :: a
    integer :: r1,r2,r3,r4
    do a = 1, 120
    r1 = mod(a, 2)
    r2 = mod(a, 3)
    r3 = mod(a, 5)
    r4 = mod(a, 7)
        if ( a == 1) then
            print *, "x"
        else if ( r1 ==0 .and.a/=2 ) then
            print *, "x"
        else if ( r2 ==0 .and.a/=3 ) then
            print *, "x"
        else if ( r3 ==0 .and.a/=5 ) then
            print *, "x"
        else if ( r4 ==0 .and.a/=7 ) then
            print *, "x"
        else
            print *, "o"
        end if
    end do
end program main

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: