Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- int numbers[5], i, j, total = 0;
- for(i = 0; i < 5; i++){
- printf("Input %d numbern", i+1);
- scanf("&d", &numbers[i]);
- }
- for(j = 0; j <5; j++){
- if((numbers[j]%2) != 0)
- total += numbers[j];
- }
- printf("Sum of odd values: %dn", total);
- return 0;
- }
Add Comment
Please, Sign In to add comment