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 |
What is static function? Explain with an example
Explain container class.
Define what is constructor?
What are the advantages and disadvantages of using inline and const?
2 Answers Polaris, TCS, Zimmer Biomet,
Which one is better- macro or function?
Is C++ case sensitive a) False b) Depends on implementation c) True
Is java easier than c++?
What are vtable and vptr?
Write about the various sections of the executable image?
What is the difference between a pointer and a link in c ++?
What can c++ be used for?
What are the comments in c++?