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 polymorphism?
How do you print a string on the printer?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
Can we change the basic meaning of an operator in c++?
What are the advantages of using pointers in a program?
Copy Linked List using recursive function?
How to create a pure virtual function?
Is sorted c++?
Is c++ vector dynamic?
What do you mean by vtable and vptr in c++?
What are register variables?
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c