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

Explain what is the stack?

842


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

932


What is a lookup table in c?

826


What are the loops in c?

780


What is indirection in c?

810


Explain what is output redirection?

889


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2088


Explain the process of converting a Tree into a Binary Tree.

2405


How to compare array with pointer in c?

845


What is call by reference in functions?

888


Stimulate calculator using Switch-case-default statement for two numbers

2701


Dont ansi function prototypes render lint obsolete?

821


What is the difference between functions abs() and fabs()?

882


How can I sort a linked list?

811


What is volatile keyword in c?

781