Immediate Help!

Dec 10, 2013 at 1:46pm
Write a program that tells how many ones and how many tens are there in a number from 10-99;
example

the number 34 has 3 (tens) and 4 (ones)

??
Dec 10, 2013 at 1:54pm
34 / 10 = 3
34 & 10 = 4

The first line demonstrates integer division.
The second operation uses the modulo operator.

Research these concepts and use them in your program.
Last edited on Dec 10, 2013 at 1:55pm
Topic archived. No new replies allowed.