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 putchar() function?
Explain why C language is procedural?
How many types of arrays are there in c?
List some basic data types in c?
What is the 'named constructor idiom'?
What are directives in c?
What does 2n 4c mean?
simple program of graphics and their output display
What is nested structure in c?
What does stand for?
What is the use of a ‘ ’ character?
What is static and auto variables in c?
When is a null pointer used?
Why array is used in c?
Differentiate between full, complete & perfect binary trees.