- 专项训练之循环结构
114
- 2023-8-3 14:03:11 @
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m,k=0;
cin>>n>>m;
for(int i=n;i<=m;i++)
{
if(i%2!=0)
{
k+=i;
}
}
cout<<k;
return 0;
}
0 comments
No comments so far...