please can some one guide me, to the answer

Write a C program to enter 15 numbers as an input from the
keyboard and program will find and print odd numbers and
their average.

i have studied
while and do while loop
for loop
if and else if
switch

Answer Posted / lalabs

// more simple and faster
if( numbers[i] & 1)
{
printf("Odd number: %d\n", numbers[i]);
sum += numbers[i]; // sum the numbers
count++; // count the odd numbers
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between main and void main?

889


Why is #define used?

1043


What does %c do in c?

805


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2159


What are the two types of functions in c?

793


When should a type cast be used?

796


There seem to be a few missing operators ..

837


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1118


Why c is called top down?

881


What is #line?

839


What does the message "automatic aggregate intialization is an ansi feature" mean?

952


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

3272


What is the difference between #include

and #include “header file”?

821


Explain what is operator promotion?

873


How can my program discover the complete pathname to the executable from which it was invoked?

879