Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 18th, 2010 | Syntax: None | Size: 0.80 KB | Hits: 76 | Expires: Never
Copy text to clipboard
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char *argv[]) {
  4.  
  5.    long long barcode;
  6.    printf("Enter barcode: ");
  7.    scanf("%lld", &barcode);
  8.    int a = barcode % 10;
  9.    int b = (barcode % 100) / 10;
  10.    int c = (barcode % 1000) / 100;
  11.    int d = (barcode % 10000) / 1000;
  12.    int e = (barcode % 100000) / 10000;
  13.    int f = (barcode % 1000000) / 100000;
  14.    int g = (barcode % 10000000) / 1000000;
  15.    int h = (barcode % 100000000) / 10000000;
  16.    int i = (barcode % 1000000000) / 100000000;
  17.    int j = (barcode % 10000000000) / 1000000000;
  18.    int k = (barcode % 100000000000) / 10000000000;
  19.    int l = (barcode % 1000000000000) / 100000000000;
  20.    int m = barcode / 1000000000000;
  21.    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);
  22. return 0;
  23. }