Advertisement
iipq

Untitled

Nov 19th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5. int i, up, low, sum=0;
  6. printf("Enter upper and lower limit");
  7. scanf("%d %d", &up, &low);
  8.  
  9. for(i=low;i=up;i++){
  10.         if (i%2!=0){
  11.             sum=sum+i;
  12.         }
  13. }
  14. printf("Sum is %d", sum);
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement