Question: if (start_temp 200 .or. j>(stop_temp-start_temp)) then do print*, Invalid Value Type the difference read*, j if (start_temp>-10 .or. stop_temp <200 .or. j>(stop_temp-start_temp)) exit !If user

if (start_temp<-10 .or. stop_temp>200 .or. j>(stop_temp-start_temp)) then do print*, "Invalid Value Type the difference" read*, j if (start_temp>-10 .or. stop_temp<200 .or. j>(stop_temp-start_temp)) exit !If user entered the correct input then the program exit. end do end if ! allocate memory to temp_array allocate ( temp_array(((stop_temp-start_temp)/j)+1,3) ) write(*,*) '| ','Centigrate','()','|',' ', 'Fahrenhite','()' ,'|','Kelvin','()', '|' k1=1 do i = start_temp, stop_temp, +j Fahrenheit= (32.0+i*1.8) Kelvin=i+273.15 ! Put values in Array temp_array(k1,1)=i temp_array(k1,2)= Fahrenheit temp_array(k1,3)=Kelvin k1=k1+1 end do k1=1 ! To print values from Array do while(k1<=((stop_temp-start_temp)/j)+1) write(*,*) '| ',temp_array(k1,1),'|',' ', temp_array(k1,2) ,'|',temp_array(k1,3), '|' k1=k1+1 end do ! To display size of Array write(*,*) 'Size of Matrix',size(temp_array) deallocate (temp_array) end program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!