#include<bits/stdc++.h>
using namespace std;
int main()
{
int m,n,a;
cin>>m>>n;
for (int i=m;i<=n;i++){
if(i%2==1){
a+=i;
}
}
cout<<a;
}
07-04
2815
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-29
340
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int m,n,a;
cin>>m>>n;
for (int i=m;i<=n;i++){
if(i%2==1){
a+=i;
}
}
cout<<a;
}