Guest User

Untitled

a guest
Dec 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. main()
  4. {
  5. int numbers[5], i, j, total = 0;
  6. for(i = 0; i < 5; i++){
  7. printf("Input %d numbern", i+1);
  8. scanf("&d", &numbers[i]);
  9. }
  10. for(j = 0; j <5; j++){
  11. if((numbers[j]%2) != 0)
  12.  
  13. total += numbers[j];
  14.  
  15. }
  16. printf("Sum of odd values: %dn", total);
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment