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 uint8 in c?
What 'lex' does?
What is the use of typedef in structure in c?
What is pointer to pointer in c language?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is the meaning of 2d in c?
why wipro wase
Array is an lvalue or not?
What is memory leak in c?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is the size of empty structure in c?
What are the functions to open and close the file in c language?
What is array of structure in c programming?
What is a stream water?
How to write a code for reverse of string without using string functions?