!program for celcius to farenheit scale
write(*,*)"enter the temperature in celcius scale"
read(*,*)c
f=(9*c)/5 +32
write(*,*)"the temperature in farenheit scale is"
write(*,*)
stop
end
!progrm for sum
read(*,*)a,b,c
y=a+b+c
write(*,*)y
stop
end
! sum for n numbers
read (*,*) n
sum=0
do i=1,n
sum=sum+i
end do
write (*,*)
sum
stop
end
!sum of odd
numbers
read(*,*)n
x=0
do
i=1,n,2
x=x+i
end do
write(*,*)
stop
end
No comments:
Post a Comment
Thanks for comment.