How to sum different digits in one integer? For example: int = and 411; I want to pull out the numbers and sum them: 4 + 1 + 1 = 6, tried in various ways, but I gather ASCII value in the table, and I do not want it?
121208
What's the fastest and easiest to read implementation of calculating the sum of digits?  I.e. Given the number: 17463 = 1 + 7 + 4 + 6 + 3 = 21
14414
I am trying to convert an integer number in C into an array containing each of that number's digits  i.e.  if I have   int number = 5400   how can I get to   int numberArray[4]   where   numberArray[0] = 0; numberArray[1] = 0; numberArray[2] = 4; numberArray[3] = 5;   Any suggestions gratefully received.
6659
Given: a = 1 b = 10 c = 100  How do I display a leading zero for all numbers with less than two digits? This is the output I'm expecting: 01 10 100
113972
Are there any simple methods for calculating the digits of $\pi$? Computers are able to calculate billions of digits, so there must be an algorithm for computing them. Is there a simple algorithm that can be computed by hand in order to compute the first few digits?
43737
After working it out on a number line, I got: $\{4, 5, 6\}$.  As it stands, the expression contains the integers that do not belong to the set $B$ that cross into $C$. This would result in $4, 5, 6$. Number $7$ would not be included because of the soft brackets surrounding $C = (2, 7)$. Is this correct?
120131
The sum of the digits in $9 k$ (where $k$ is an integer) is a multiple of $9$: for example   $$9\cdot 1=9$$ $$9\cdot 7=63 \qquad  \text{and } 6+3=9\cdot 1$$ $$9\cdot 11=99 \qquad \text{and }  9+9=9\cdot 2$$  But why?
33878
Can sum of a rational number and its reciprocal be an integer?   My brother asked me this question and I was unable to answer it.   The only trivial solutions which I could think of are $1$ and $-1$.  As to what I tried, I am afraid not much. I have never tried to solve such a question, and if someone could point me in the right direction, maybe I could complete it on my own.  Please don't misunderstand my question.   I am looking for a rational number $r$ where $r + \frac{1}{r}$ is an integer.
95227
I have a question and got strucked on this.. To find the total no. of six digit numbers that can be formed having property that every succeeding digit is greater than preceding digit. Please guide me to solve this. Thanks in advance.
70725
I'm having trouble displaying a binary number into a display. I'm not sure of how to split a number in binary into its individual numbers.  For example, if I want to display 25, I want to split this into "2" and "5" in binary.  I have 8 bits coming in and would like to split it into two 4 bit parts with the first 4 bits representing the first digit in binary and second 4 bits representing the second digit in binary.   EDIT: To clarify, I'm trying to do this using logic gates.
69830
So my question is that let's say I have a bit string of length four. If it is illegal to have 3 1's in a row and 3 0's in a row then how many bit string of this type exists  I was thinking that in total combination of bit strings of length four there is $2^4$, but in this case there is 2+2 illegal combinations so the total is   $2^4-4$ is this correct?
74908
is it possible for someone to run a computer search for me to turn up integers $a,b,c,d$ such that $$1+\sqrt{2}+\sqrt{3}+\sqrt{6}=\sqrt{a+\sqrt{b+\sqrt{c+\sqrt{d}}}}$$? Note: I know they exist, I just can't find them.
6195
Using PHP, what's the fastest way to convert a string like this: "123" to an integer?  Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an array?
77376
var i : integer;  i := 1234567;   Given the above, I want the string "1,234,567" as output (assuming UK locale). IntToStr just gives me "1234567". I'm sure there's a one-liner for this, but I can't find it...
46742
Is there a library or a class/function that I can use to convert an integer to it's verbal representation?  Example input:     4,567,788`   Example output:     Four million, Five hundred sixty-seven thousand, seven hundred eighty-eight
72410
Now I have proved the following two problems:      (1) Prove that a number and the sum of its digits have the same remainder upon division by 9.    (2) Given an integer, consider the difference between the sum of the digits in odd positions (counting from the right) and those in even positions. Show that the difference has the same remainder as the number itself when divided by 11.    Then, I need help on the following problem:      Partition the digits of a number into groups of two and three, respectively, starting from the right. Treat these as two- and three-digit numbers, respectively, and proceed similarly as in the two problems above. What divisibility rules arise?    In fact, I did not quite get what this problem asks for and not clear about this process. Could anyone give me some hints on this, please?  Thanks in advance.
43525
Let $A = 4444^{4444}$;  Then sum of digits of $A = B$; Then sum of digits of $B = C$; Then sum of digits of $C = D$;  Find $D$.  What should be the approach here?
123044
I would like to highlight specific digits in a number. Since the number is large I would like to use \num{} from . Of course I can do it manually as in the MWE below, but was hoping that there might be an easy way to use the commented out syntax to accomplish this:  Code: \documentclass{article} \usepackage{xcolor} \usepackage{siunitx}  \newcommand*{\Color}[2][red]{\textcolor{#1}{#2}}%  \begin{document}  \num{99 976}  88\,9\Color{76} %\num{88 9\Color{76}}  77\,\Color{976} %\num{77 \Color{976}}  \end{document}