Formatting a barcode with hyphens in between - Assignment question
Posted
by capex
on Stack Overflow
See other posts from Stack Overflow
or by capex
Published on 2010-03-16T13:51:29Z
Indexed on
2010/03/16
13:56 UTC
Read the original article
Hit count: 355
Hi,
The assignment at my first year uni computing course says my program should read a barcode number, and then display the same 13 digit barcode number separated by hyphens. For example, 9300675016902 should look like 930-067501-690-1.
The restrictions say I can't use the following:
No arrays No strings No functions.
Any directions on this?
(So far I have done this:
part1 = barcode/10000000000;
which gives me the first three digits, and this:
part4 = barcode%10;
which gives me the last digit.
Thanks in advance!
© Stack Overflow or respective owner