Advertisement
Md_hosen_zisad

pblm1

Nov 1st, 2017
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3.     int main()
  4. {
  5.     int i,T,count=0,c=0;
  6.     scanf("%d",&T);
  7.     while(T--)
  8.     {
  9.         int a,b;
  10.         scanf("%d %d",&a,&b);
  11.         for(i=a;i<=b;i+=2)
  12.         {
  13.             count=count+i;
  14.  
  15.         }c++;
  16.         printf("Case  %d:%d\n",c,count);
  17.  
  18.                 count=0;
  19.  
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement