C Program to test whether a number is even or odd
write(*,*)'Input the number:'
read(*,*)n
if (mod(n,2).eq.0)then
write(*,*)'The number is Even.'
else
write(*,*)'The number is odd.'
end if
end
write(*,*)'Input the number:'
read(*,*)n
if (mod(n,2).eq.0)then
write(*,*)'The number is Even.'
else
write(*,*)'The number is odd.'
end if
end
Comments
Post a Comment