输出21世纪所有的闰年.判断闰年的条件是:能被4整除但不能被100整除,或者能被400整除.并按4个年份一组
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/18 17:13:34
![输出21世纪所有的闰年.判断闰年的条件是:能被4整除但不能被100整除,或者能被400整除.并按4个年份一组](/uploads/image/z/1294828-52-8.jpg?t=%E8%BE%93%E5%87%BA21%E4%B8%96%E7%BA%AA%E6%89%80%E6%9C%89%E7%9A%84%E9%97%B0%E5%B9%B4.%E5%88%A4%E6%96%AD%E9%97%B0%E5%B9%B4%E7%9A%84%E6%9D%A1%E4%BB%B6%E6%98%AF%EF%BC%9A%E8%83%BD%E8%A2%AB4%E6%95%B4%E9%99%A4%E4%BD%86%E4%B8%8D%E8%83%BD%E8%A2%AB100%E6%95%B4%E9%99%A4%2C%E6%88%96%E8%80%85%E8%83%BD%E8%A2%AB400%E6%95%B4%E9%99%A4.%E5%B9%B6%E6%8C%894%E4%B8%AA%E5%B9%B4%E4%BB%BD%E4%B8%80%E7%BB%84)
输出21世纪所有的闰年.判断闰年的条件是:能被4整除但不能被100整除,或者能被400整除.并按4个年份一组
输出21世纪所有的闰年.判断闰年的条件是:能被4整除但不能被100整除,或者能被400整除.并按4个年份一组
输出21世纪所有的闰年.判断闰年的条件是:能被4整除但不能被100整除,或者能被400整除.并按4个年份一组
我用C编的,用wintc试验成功.将21世纪设为2000到2099
#include "stdio.h"
#include "conio.h"
main()
{int z;
int i=0,j,n=0,lead;
printf("plesae enter the century,eg:21\n");
scanf("%d",&z);j=(z-1)*100;
for(;i
太多了,用vb编程
private sub command1_click()
dim i as integer ,k as integer
for i =2000 to 2999
if (i mod 4=0 and i mod 100 <>0 ) or (i mod 400=0 ) then...
全部展开
太多了,用vb编程
private sub command1_click()
dim i as integer ,k as integer
for i =2000 to 2999
if (i mod 4=0 and i mod 100 <>0 ) or (i mod 400=0 ) then
print i ;
k =k +1
end
if k mod 4=0 then print
next i
end sub
收起
private sub command1_click()
dim i as integer ,k as integer
for i =2000 to 2999
if (i mod 4=0 and i mod 100 <>0 ) or (i mod 400=0 ) then
...
全部展开
private sub command1_click()
dim i as integer ,k as integer
for i =2000 to 2999
if (i mod 4=0 and i mod 100 <>0 ) or (i mod 400=0 ) then
print i ;
k =k +1
end
if k mod 4=0 then print
next i
end sub
收起