Untitled
By: a guest | Mar 18th, 2010 | Syntax:
None | Size: 0.80 KB | Hits: 76 | Expires: Never
#include <stdio.h>
int main(int argc, char *argv[]) {
long long barcode;
printf("Enter barcode: ");
scanf("%lld", &barcode);
int a = barcode % 10;
int b = (barcode % 100) / 10;
int c = (barcode % 1000) / 100;
int d = (barcode % 10000) / 1000;
int e = (barcode % 100000) / 10000;
int f = (barcode % 1000000) / 100000;
int g = (barcode % 10000000) / 1000000;
int h = (barcode % 100000000) / 10000000;
int i = (barcode % 1000000000) / 100000000;
int j = (barcode % 10000000000) / 1000000000;
int k = (barcode % 100000000000) / 10000000000;
int l = (barcode % 1000000000000) / 100000000000;
int m = barcode / 1000000000000;
printf("%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n", barcode, m, l, k, j, i, h, g, f, e, d, c, b, a);
return 0;
}