answersLogoWhite

0

#include<iostream>

using namespace std;

void main() {

int odd,even,number;

odd=0;

even=0;

for(int x=1;x<=10;x=x+1){

cout<<"enter a number\n";

cin>>number;

if(number%2==0){

even++;

}

else {

odd++;

}

}

cout<<"even number has:"<<even;

cout<<"odd number has:"<<odd;

}

User Avatar

Wiki User

∙ 16y ago
User Avatar

What else can I help you with?

Related Questions

How do you print nos from 10-0 then only even nos are printed in a program flowchart?

10


Write a c program to print the 100 to 1 nos?

Write a c program to print the 100 to 1 nos


Using while loop write a program which calculates the product of digits from 1 to 5 and also show these nos vertically?

Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.


C program to accept a sequence of number terminated by zero and sum all odd nos and even nos?

#include &lt;stdio.h&gt; main() { int n, odd=0, even=0; while (scanf("%d",&amp;n)&amp;&amp;(n!=0)) (n%2)?++odd:++even; printf("odd: %d even: %d\n",odd,even); }


How do you write see you there in Spanish?

nos vemos


How do you write 10 million in nos?

10,000,000


What does escreva nos mean in Portuguese?

Write (to) us


Write a programme to find the sum and product of three numbers?

//sum and product of 3 nos #include #include void main() { int a,b,c; printf("enter the 3 nos"); scanf("%d%d%d",&amp;a,&amp;b,&amp;c); printf("sum of 3 nos",a+b+c); printf("product of 3 nos",a*b*c); getch(); }


What will you get if you add s odd numbers and 2 even nos?

even


The product of two consecutive odd integers is 2 less than six times their sum can you find the two integers?

there cannot be any nos like that.. product of 2 odd nos is odd.. sum of two even nos is even.. that multiplied by six is even too.. subtracting 2 from that also gives an even no.. let x and y be the odd integers. according to the given question xy=6(x+y)-2..here we r actually equatin an odd no and an even no.. which is wrong.. so there cant be any two consecutive odd nos that fit in the question


What are even nos between 100 to 300 that is the sum of two prime nos?

Each one of them can be expressed as a sum of two primes.


Are all the factors of 100 even?

No most are odd nos.