C To check whether a number is devisible by 7 or not
write(*,*)'Input the integer number:'
read(*,*)n
if (mod(n,7).eq. 0)then
write(*,*)'The number is divisible to 7.'
else
write(*,*)'The number is not divisible to 7.'
end if
end
write(*,*)'Input the integer number:'
read(*,*)n
if (mod(n,7).eq. 0)then
write(*,*)'The number is divisible to 7.'
else
write(*,*)'The number is not divisible to 7.'
end if
end
Comments
Post a Comment