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...


wap to accept 10 numbers & display the number of odd and
even numbers??



wap to accept 10 numbers & display the number of odd and even numbers??..

Answer / suman_kotte

void main()
{
int a[10],i,even=0,odd=0;
cout<<"enter 10 num's";
for(i=1;i<=10;i++)
{
cin>>a[i];
}
for(i=1;i<=10;i++)
{
if(a[i]%2==0)
even++;
else
odd++;
}
cout<<"the num of even num"<<even;
cout<<"the num of odd num"<<odd;
}

Is This Answer Correct ?    17 Yes 1 No

Post New Answer

More C++ General Interview Questions

Explain linear search.

0 Answers  


What is a volatile variable in c++?

2 Answers  


What is exception handling? Does c++ support exception handling?

0 Answers  


What is multithreading and what is its use?Whats are multithreading techniques used in C++?

1 Answers  


Write a corrected statement in c++ so that the statement will work properly. x + y=z;

2 Answers  


Why would you make a destructor virtual?

3 Answers   Lehman Brothers,


Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

0 Answers  


What are the techniques you use for debugging?

1 Answers   Adtran,


How do we implement inheritance in c++?

0 Answers  


How is objective c different from c++?

0 Answers  


What is the difference between while and do while loop? Explain with examples.

0 Answers  


What is a constructor in c++ with example?

0 Answers  


Categories