Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is putchar() function?

1164


Explain why C language is procedural?

1226


How many types of arrays are there in c?

1049


List some basic data types in c?

1029


What is the 'named constructor idiom'?

1090


What are directives in c?

974


What does 2n 4c mean?

1235


simple program of graphics and their output display

2003


What is nested structure in c?

1069


What does stand for?

1086


What is the use of a ‘’ character?

1094


What is static and auto variables in c?

1091


When is a null pointer used?

1117


Why array is used in c?

1016


Differentiate between full, complete & perfect binary trees.

1109