fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. long number = 378282246310005;
  6. long num1 = number;
  7.  
  8. //Counts the digits the card has
  9. int dcounter = 0;
  10. while (num1 != 0)
  11. {
  12. num1 /= 10;
  13. dcounter++;
  14. }
  15.  
  16. printf("dcounter, %i\n", dcounter);
  17. printf("num1, %lo\n", num1);
  18. printf("number (octal), %lo\n", number);
  19. printf("number (dec), %ld\n", number);
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 5436KB
stdin
Standard input is empty
stdout
dcounter, 15
num1, 0
number (octal), 12600566272504165
number (dec), 378282246310005