Advertisement
noshin98

10783

Jun 23rd, 2016
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,b,i,sum;
  5.     while(scanf("%d%d", &a,&b)==2)
  6.     {
  7.         if(a%2==1 && b%2==1 && 0<=a<=b<=100)
  8.         {
  9.             i=a+2;
  10.             for(i=a+2;i<=b;i=i+2)
  11.             {
  12.                 sum =a+i;
  13.                 a=sum;
  14.             }
  15.             printf("%d\n",sum);
  16.         }
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement