Hi, so I'm trying to make a program that will display the digits of up to a maximum of 10 digit number in column form. I used "long long int" since it's a huge number. And for my printf and scanf I used "%lld". I get an error pointing at my 'for loop' line saying "Integer constant is too large for 'long' type". I use Quincy on Windows 7. Here is the code:
Code:
#include <stdio.h>
main ()
{
long long int n;
long long int digit;
long long int i=10,j=1;
printf ("Enter a positive integer up to a maximum of 10 digits: ");
scanf ("%lld",&n);
printf ("\n");
for (i;i<=10000000000;i*=10)
{
digit=(n%i)/j;
printf ("%lld \n",digit);
j*=10;
}
}
Thanks!