Showing posts with label Fortran. Show all posts
Showing posts with label Fortran. Show all posts

Friday, 16 August 2019

Fortran program for celcius to farenheit scale


!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