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 cohesion and coupling in c?
Are global variables static in c?
how is the examination pattern?
what is event driven software and what is procedural driven software?
What is structure and union in c?
What is sorting in c plus plus?
What is pointer & why it is used?
Why isnt any of this standardized in c?
Explain void pointer?
Do array subscripts always start with zero?
I need a sort of an approximate strcmp routine?
Why does everyone say not to use scanf? What should I use instead?
What Is The Difference Between Null And Void Pointer?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Was 2000 a leap year?