- 计算1—100中奇数的和、偶数的和
YUYH
- 2023-9-10 14:07:16 @
#include <bits/stdc++.h> //头文件
using namespace std; //命名空间
int main() //主函数,程序
{
for(int i=1;i<=100;i++)
{
if(i%2==0)
{
cout<<i<<" ";
}
}
return 0; //程序结束,返回
}
0 comments
No comments so far...
Information
- ID
- 784
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- # Submissions
- 122
- Accepted
- 33
- Uploaded By