Divide with a loop in Fortran

0

I'm trying to create a program that divides my number by two until I reach the unit and that's where the program ends.

program multiplicacion
    implicit none
    integer :: a
    integer :: b 
    integer :: i

        print*, "Escribe dos números naturales entre 0 y 100:"

    read*, a , b 

        do while((a<=100).and.(b<=100)) 
            write(*,*) "Los números cumplen las condiciones requeridas"
            read(*,*) a , b 
            a=a/2;i=i/2
        end do
end program multiplicacion

Thanks in advance.

    
asked by Joaquin 22.11.2018 в 23:19
source

0 answers