Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a=0,N,r,a1=0;
- printf("Enter input ::");
- scanf("%d",&N);
- while(N!=0)
- {
- r=N%10;
- N=N/10;
- if(r%2==0)
- a=a+r;
- else
- a1=a1+r;
- }
- printf("%d & %d",a,a1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement