Skip to content

Instantly share code, notes, and snippets.

@joaogui1
Created May 2, 2016 00:10
Show Gist options
  • Save joaogui1/d7aee206fedd802e3c89d239fca38f1b to your computer and use it in GitHub Desktop.
Save joaogui1/d7aee206fedd802e3c89d239fca38f1b to your computer and use it in GitHub Desktop.
// Autor: Roger Benet da Silva Souza - IFMT-BAG
#include <bits/stdc++.h>
using namespace std;
int x,y,s;
int main(){
scanf("%d %d", &x ,&y);
for(int i = min(x,y) + 1; i < max(x,y); i++)if(i%2 != 0)s += i;
printf("%d\n",s);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment