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 cohesion and coupling in c?

984


Are global variables static in c?

1108


how is the examination pattern?

1965


what is event driven software and what is procedural driven software?

2508


What is structure and union in c?

1070


What is sorting in c plus plus?

925


What is pointer & why it is used?

1061


Why isnt any of this standardized in c?

1020


Explain void pointer?

971


Do array subscripts always start with zero?

1236


I need a sort of an approximate strcmp routine?

986


Why does everyone say not to use scanf? What should I use instead?

1366


What Is The Difference Between Null And Void Pointer?

1156


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3284


Was 2000 a leap year?

1004