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 c++ code?

1176


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

1138


What is the oldest programming language?

1064


What is enum class in c++?

1325


What do you mean by late binding?

1210


Explain the properties and principles of oop.

1073


what is the difference between overloading & overriding? give example.

1276


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1146


Should you pass exceptions by value or by reference?

1185


What is #include c++?

1205


What is virtual destructor? What is its use?

1124


Are iterators pointers?

1210


Which operations are permitted on pointers?

1045


What is the use of c++ programming language in real life?

1100


Which is best c++ or java?

1143