Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
program temp_conversition
implicit none
real ::fahrenheit,celsius
print*,"type value celsius"
read*,celsius
print*,"celsius"
fahrenheit=1.8*celsius+32.0
print*, "fahrenheit=", fahrenheit
end program temp_conversition
program hello
integer :: i
character(len=100) :: subject
integer :: st=0
print *, 'enter the number'
read(*,*)i
do while (i<0 .or. i>999)
print *, 'sorry the number is not in range'
read(*,*)i
end do
if (i<99) then
subject = 'General works computer science and information'
else if (i<199) then
subject = 'Philosphy and Psychology'
else if (i<299) then
subject = 'Religion'
else if (i<399) then
subject = 'social sciences'
else if (i<499) then
subject = 'Language'
else if (i<599) then
subject = 'Pure Science'
else if (i<699) then
subject = 'Technology'
else if (i<799) then
subject = 'Arts and recreation'
else if (i<899) then
subject = 'Literature'
Else
Subject = 'History and geography'
end if
print *, 'ddc :', subject
end program Hello
program HW03_01
implicit none
real:: x,y
print*, 'Enter real numbers for x and y'
read*, x,y
if (x > y) then
print*, 'larger number=', x
else if (y > x) then
print*, 'larger number=', y
else
print*, 'x=y'
endif
end program HW03_01