2008年的最后一天

今天是08年的最后一天,也许要放假了,突然觉得感慨很多.回顾过去的一年,有苦有乐,迷茫中透着希望,前进的道路中充满了坎坷,不过觉得收获很大.
08年是痛苦的一年,雪灾,大地震,疾病,让我们的心灵满受创伤.不过我们同心协力的挺过来了.
08是令人激动的一年,奥运的召开,给中国人民打了一针兴奋剂,我们为运动健儿们喝彩,为祖国加油!08世界重新认识了中国.
08年是收获的一年,去年的我还是茫然的我,一年中我努力的寻找我的人生轨迹,努力学习.一年中收获是很大的.我找到了我的目标,我的方向.
09年必将是一个希望的一年,我憧憬09,希望自己能工作中提升自己,多赚money.幸福快乐.实现的出国梦想.

Good Luck everyone!
Good luck myself!

看后请留下你的祝福和愿望.谢谢!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
下面是Fortran的代码示例,可以读取每天的温度数据,并计算每个月的平均温度: ``` program calculate_monthly_average_temperature implicit none integer :: i, year, month, day, ndays_in_month, month_start_index, month_end_index real :: temperature, monthly_average ! 数据文件名 character(len=100) :: filename = "temperature_data.txt" ! 打开数据文件 open(10, file=filename, status='old', action='read') ! 循环读取每一行数据 do i=1, 14245 read(10, *) year, month, day, temperature ! 计算当前月份的天数 call days_in_month(month, year, ndays_in_month) ! 计算当前月份的起始和结束位置 month_start_index = (month - 1) * ndays_in_month + 1 month_end_index = month_start_index + ndays_in_month - 1 ! 累加当前月份的温度值 monthly_average = 0.0 if (i >= month_start_index .and. i <= month_end_index) then monthly_average = monthly_average + temperature endif ! 如果已经到达当前月份的最后一天,则计算当前月份的平均温度 if (i == month_end_index) then monthly_average = monthly_average / ndays_in_month write(*, '(A,I2,A,I4,A,F6.2)') "Month ", month, ", ", year, ": average temperature = ", monthly_average endif enddo ! 关闭数据文件 close(10) contains ! 计算指定份和月份的天数 subroutine days_in_month(month, year, ndays) implicit none integer, intent(in) :: month, year integer, intent(out) :: ndays ndays = 31 if (month == 2) then if (mod(year, 4) == 0 .and. (mod(year, 100) /= 0 .or. mod(year, 400) == 0)) then ndays = 29 else ndays = 28 endif else if (month == 4 .or. month == 6 .or. month == 9 .or. month == 11) then ndays = 30 endif end subroutine days_in_month end program calculate_monthly_average_temperature ``` 假设数据文件中的每一行数据格式为:份 月份 日份 温度值,共计14245行数据。程序中使用了一个子程序`days_in_month`,用于计算指定份和月份的天数,从而确定每个月份的起始和结束位置。程序依次读取每一行数据,并根据当前月份的起始和结束位置,累加当前月份的温度值。如果已经到达当前月份的最后一天,则计算当前月份的平均温度,并输出结果。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值