JMU
Digit Manipulation
A Programming Pattern


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Motivation
Going Further: Binary Numbers
Review

Decimal Representation of an Integer

images/Base10.svg
Thinking About the Problem
Thinking About the Problem (cont.)
The Pattern
The Pattern (cont.)
Examples
Examples (cont.)
Examples (cont.)
A Warning