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
Explain what is the stack?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What is a lookup table in c?
What are the loops in c?
What is indirection in c?
Explain what is output redirection?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
Explain the process of converting a Tree into a Binary Tree.
How to compare array with pointer in c?
What is call by reference in functions?
Stimulate calculator using Switch-case-default statement for two numbers
Dont ansi function prototypes render lint obsolete?
What is the difference between functions abs() and fabs()?
How can I sort a linked list?
What is volatile keyword in c?