#include <stdio.h> int main() { int year; double year1=1000000000.0/365.0/24.0/3600.0; double year2=year1; while(year2>=1){ year2--; } if(year2>=0.5){ year=int(year1)+1; } else{ year=int(year1); } printf("10亿秒约等于%d年\n", year); return 0; }
标签:int,double,year1,year2,任务,实验,year From: https://www.cnblogs.com/yukinoshita-/p/17739913.html