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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is set in c++?

1113


What are arrays c++?

1093


How would you use the functions randomize() and random()?

1064


What are pointers used for c++?

1052


What is endianness?

1081


How do you remove an element from a set in c++?

1077


Does c++ support multilevel and multiple inheritances?

996


What is the type of this pointer in c++?

1058


What is a loop? What are different types of loops in c++?

1106


Is c++ map a hash table?

1009


Is swift faster than c++?

1015


What do you mean by overhead in c++?

1078


What are the classes in c++?

1098


Is overriding possible in c++?

996


What are c++ variables?

1058