multiply every odd number?

So I have this number
6011002543517833
(6*2) 0 (1*2) 1 (0*2) ....
12 0 2 1 0 ...
1+2 + 0 + 2 +1 +0 ...
problem is int can't read over 9 power?
so i know if i set int number = (double)original number / 1^16 will get 6 but
how do i getthe rest of the numbers?
Last edited on
You may find long long int to be better for your needs as far as the size of the number goes.
http://en.wikipedia.org/wiki/C_data_types#Basic_types

Though, a simpler question, why not just read the number in as a string and process it that way?

-Albatross
well its a project professor gave us but I got stuck from the start because int doesn't work in that case. I think i figured out a way to get that number but not sure I am doing it right.
try a double or long double
-edit-
and anyway what method are you currently using?
Last edited on
Topic archived. No new replies allowed.