# I need a little help starting this...

This is a discussion on I need a little help starting this... within the C Programming forums, part of the General Programming Boards category; I've just recently started programming with C at college and I've been given a problem that has me stumped. 6. ...

1. ## I need a little help starting this...

I've just recently started programming with C at college and I've been given a problem that has me stumped.

6. Write a program to determine whether the sum of digits of a three digit input number is even or odd. The input may have less than 3 digits, but never more. For instance, the sum of digits of 145 is 1+4+5. The answer is 10 which is even. Your program should first sum the digits and then determine whether this sum is even or odd. USE A LOOP STRUCTURE TO SEPARATE THE DIGITS AND ADD THEM.

How would I even go about starting this problem? Thanks for any help.

2. Any 3 digit number can be written as :

a*10^2 + b*10^1 + c*10^0

Let's call this number m. Now notice that :

m mod 10 = c
m mod 100 = b*10 + c
m mod 1000 = c*100 + b*10 + c

Noticing a pattern yet ?

3. Discover what 145 % 10 does, and what 145 / 10 does.