program main implicit none integer :: i,a,b,s print*, "enter two numbers" read*, a,b s = 0 do i=1, abs (b) if (b>0) then s = s+a else s= s-a end if end do print*, "answer",s end program main
To embed this project on your website, copy the following code and paste it into your website's HTML: