#include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
bool runnian(int t)
{
if (t%4==0||t%400==0&&t%100!=0)
return true;
else
return false;
}
int main()
{
int t;
cin>>t;
if (runnian)
cout <<"yes";
else
cout<<"no";
return 0;
}c++ 用bool判断闰年
最新推荐文章于 2025-11-05 00:15:00 发布
本文提供了一个使用C++编写的简单程序来判断输入的年份是否为闰年。通过定义一个布尔函数`runnian`来进行闰年的逻辑判断,并在`main`函数中接收用户输入的年份进行验证。
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Linly-Talker
AI应用
Linly-Talker是一款创新的数字人对话系统,它融合了最新的人工智能技术,包括大型语言模型(LLM)、自动语音识别(ASR)、文本到语音转换(TTS)和语音克隆技术
873

被折叠的 条评论
为什么被折叠?



