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
What is difference between main and void main?
Why is #define used?
What does %c do in c?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What are the two types of functions in c?
When should a type cast be used?
There seem to be a few missing operators ..
Which control loop is recommended if you have to execute set of statements for fixed number of times?
Why c is called top down?
What is #line?
What does the message "automatic aggregate intialization is an ansi feature" mean?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
What is the difference between #include
Explain what is operator promotion?
How can my program discover the complete pathname to the executable from which it was invoked?