77 941
Assignments Done
Successfully Done
In August 2019

Answer to Question #7771 in C++ for asim

Question #7771
write a program which take five integers from user and print the sum of all odd integers
Expert's answer

int main(int argc, char * argv[]){

int sum=0, num, i;
for (i=1;i<=5;i++){
& printf("Enter some integer please: ");
& scanf("%d", &num);
& if (num%2 != 0) sum += num;

printf("The sum of odd numbers is %d \n", sum);
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions