Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int num,g,num1,res;
- res=0;
- scanf("%d %d",&num,&num1);
- if(num1>num){
- for(g=num;g<=num1;g++){
- if(g%2!=0);
- res=g+res;
- }
- }
- if(num>num1){
- for(g=num1;g<=num;g++){
- if(g%2!=0);
- res=g+res;
- }
- }
- printf("%d\n",res);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement