摘要:
例题1 循环输入一周日最高气温,判断最高气温,并计算一周平均最高气温。求出这几天的哪一天的气温最高?2014年3月23日-29日南京日最高气温如下:16.0 17.0 17.0 18.0 16.0 22.0 24.0 (单位:℃) program main integer i,j,ri real t 阅读全文
摘要:
程序源码: program main implicit none integer i,sum real t(7),tmax tmax=0.0;sum=0 do i=1,7 read*,t(i) if(t(i)>=tmax) then tmax=t(i) end if if(t(i)>20) then 阅读全文
摘要:
program ex1 implicit none integer i real sum,tave,t,tmax sum=0.0 tmax=0.0 do i=1,7 read*,t sum=t+sum if(t>tmax) then tamx=t end if end do tave=sum/7 p 阅读全文
摘要:
program ex06_02 implicit none !希望后面用到的变量,先声明后使用,并且取消I-N规则 real r11,r12,r13,r14,r15,total11,av11 !还没有学习到数组和循环,所以说对所用到的数据都要用变量来存放,即使是已知的数据要用到变量,后面要输出的数据 阅读全文