#一起来搞C++#
#include
using namespace std;
int main()
{
int year,month,day;
while(cin>>year>>month>>day)
{
int Days=0;
int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
if((year%4==0&&year%100!=0)||year%400==0)
{
mon[1]=29;
}
else mon[1]=28;
for(int i=0;i {
Days+=mon[i];
}
Days+=day;
cout< }
return 0;
}
#include
using namespace std;
int main()
{
int year,month,day;
while(cin>>year>>month>>day)
{
int Days=0;
int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
if((year%4==0&&year%100!=0)||year%400==0)
{
mon[1]=29;
}
else mon[1]=28;
for(int i=0;i
Days+=mon[i];
}
Days+=day;
cout<
return 0;
}
#一起来搞C++#
向量容器的用法:
#include
#include
using namespace std;
int main()
{
long int a,b;
long int m,n;
vector v;
vector p;
while(cin>>a>>b)
{
m=a;n=b;
while(m!=0)
{
v.push_back(m%10);
m=m/10;
}
while(n!=0)
{
p.push_back(n%10);
n=n/10;
}
long int sum=0;
for(int i=0;i {
for(int j=0;j{
sum+=v[i]*p[j];
}
}
cout< v.clear();
p.clear();
}
return 0;
}
向量容器的用法:
#include
#include
using namespace std;
int main()
{
long int a,b;
long int m,n;
vector
vector
while(cin>>a>>b)
{
m=a;n=b;
while(m!=0)
{
v.push_back(m%10);
m=m/10;
}
while(n!=0)
{
p.push_back(n%10);
n=n/10;
}
long int sum=0;
for(int i=0;i
for(int j=0;j
sum+=v[i]*p[j];
}
}
cout<
p.clear();
}
return 0;
}
#郑镒勋[超话]##solo歌手郑镒勋[超话]#
『那年今日』
130418 M cout down
cr.THE TRIPLE『禁二改商用』
| RICHOON Street生日计划https://t.cn/A67qyQsn |
| 管理层招新https://t.cn/AieHijY1 |
| 勋吧招新️https://t.cn/EV2TVOx |
| U CUBE官咖教程https://t.cn/A6wNAgjY |
| IDOLRADIO郑镒勋中字合集https://t.cn/AirMbKvx |
『那年今日』
130418 M cout down
cr.THE TRIPLE『禁二改商用』
| RICHOON Street生日计划https://t.cn/A67qyQsn |
| 管理层招新https://t.cn/AieHijY1 |
| 勋吧招新️https://t.cn/EV2TVOx |
| U CUBE官咖教程https://t.cn/A6wNAgjY |
| IDOLRADIO郑镒勋中字合集https://t.cn/AirMbKvx |
✋热门推荐