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

can anyone please tell about the nested interrupts?

2076


what will be maximum number of comparisons when number of elements are given?

1861


What is pass by reference in functions?

787


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

1047


Is null valid for pointers to functions?

1119


What is the benefit of using #define to declare a constant?

1057


What is the benefit of using const for declaring constants?

996


Do array subscripts always start with zero?

1246


When should a type cast be used?

972


Why doesnt that code work?

1089


In C programming, what command or code can be used to determine if a number of odd or even?

1004


State two uses of pointers in C?

1014


Explain what are the different file extensions involved when programming in c?

1065


How many main () function we can have in a project?

1073


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2253