C Program to find the sum of all odd numbers between 1 and 20
write(*,*)'The odd numbers between 1 to 20 are :'
sum=0
do i=1,20,2
write(*,*)i
sum=sum+i
end do
write(*,*)'The sum of these numbers is:',sum
end
write(*,*)'The odd numbers between 1 to 20 are :'
sum=0
do i=1,20,2
write(*,*)i
sum=sum+i
end do
write(*,*)'The sum of these numbers is:',sum
end
Comments
Post a Comment