answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int num,num_save;

int ar[5],i=0,res_e=0,res_o=0;

printf("\nEnter the number : ");

scanf("%d",&num);

num_save=num;

while(num_save>0)

{

ar[i]=num_save%10;

num_save/=10;

i++;

}

i--;

while(i>=0)

{

if(ar[i]%2==0)

res_e=res_e+ar[i];

else

res_o=res_o+ar[i];

}

printf("\nNumber is %d\n",num);

printf("\nSum of even digits is %d",sum_e);

printf("\nSum of odd digits is %d",sum_o);

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How many digits did Fabrice Bellard calculate in 2009?

more that 50 digits.


How do you make the copyright symbol on the computer?

Press Alt key in the keyboard and press the digits 0,1,6,9


How can you calculate leap year?

divid the last to digits by 4


How many digits of pi did William shanks calculate?

707


Which brothers built a homemade supercomputer to calculate the digits of Pi?

computer


How many sequences of 6 digits can you form given the condition that no two adjacent digits have the same parity?

2 x 56.


What is a spook number-?

8161 is a Spook Number. It is made up of digits that are not 0s. All the digits separately add up to give double the first digit. 8+1+6+1=16 2x8=16


Who is responsible for finding how many digits are in pi?

Nobody is responsible. Different groups have decided, on their own, to calculate pi to many digits - as a sort of challenge.


How many digits in pi can computers now calculate?

5,983,948,393,122,123,098 nahson.com for more information


How to calculate the value of pi from the infinite series?

There are several infinite series. To find PI to x digits, evaluate each term to x+2 digits until the value is 0. Then round to x digits.


What is the the square root of 5?

The square root of 5 is approximately 2.236. It is an irrational number meaning we can not calculate its value no matter how many digits we can find. At one point a NASA computer was used to calculate the first million digits of the number.


What do you call a person with more than five fingers?

The individual is a "polydactyl ". The condition is "polydactyly" or "polydactylism", a congenital anomaly. The extra digits are referred to as "supernumerary digits".