1 Star 0 Fork 0

CoderQi/cg初学

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
平年闰年.c 765 Bytes
一键复制 编辑 原始数据 按行查看 历史
CoderQi 提交于 2022-10-05 23:03 +08:00 . 10.5
#include<stdio.h>
//ƽ
//int main()
//{
// int count = 0;
// int y = 0;
// for (y = 1000; y <= 2000; y++)
// {
// if ((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0))
// {
// printf("%d ", y);
// count++;
// }
// }
// printf("\ncount=%d ", count);
//
//
//
//
// /*if (y % 4 == 0 && y % 100 != 0)
// {
// printf("%d ", y);
// count++;
// }
// if (y % 400 == 0)
// {
// printf("%d ", y);
// count++;
// }
// }
// printf("\n%d", count);*/
// return 0;
//}
//ж
int main()
{
int s = 0;
for (s = 100; s < 200; s++)
{
int j = 0;
for (j = 2; j < s; j++)
{
if (s % j == 0)
{
break;
}
}
if(s==j)
{
printf("%d ", s);
}
}
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/programmercg/cg-beginner.git
git@gitee.com:programmercg/cg-beginner.git
programmercg
cg-beginner
cg初学
master

搜索帮助