simple program
Function sum_odd_digits(ByVal number As Integer) As Integer Dim digit As Integer sum_odd_digits = 0 While number <> 0 digit = number Mod 10 If digit And 1 Then sum_odd_digits = sum_odd_digits + digit number = number / 10 End While End Function
"Taking a cube" is the same basic procedure, whether it's a one-digit number, a three digit number, a complex number, a square matrix, or anything else you can multiply. Taking the cube simply means, multiply the number by itself, in such a way that it appears three times as a factor. For example, if your three-digit number is 235, you calculate the cube as 235 x 235 x 235.
The largest 3-digit number - not itself a perfect square - is 999. Calculate its square root, round the answer down, then square the answer again.
algorithm is a way to solve your problem
As 1 million is the lowest 7-digit number and also the square of one thousand, the number you seek is the square of 999, which I'm sure you can calculate!
There is no last digit of pi. It is possible to calculate the digits of pi an infinite number of times. The one millionth number is 5.
Well, honey, let me break it down for you. When you multiply a 4-digit number (ranging from 1000 to 9999) by a 1-digit number (ranging from 0 to 9), the result can be a 3-digit number (ranging from 0 to 8991). So no, the product of a 4-digit number and a 1-digit number is not always a 5-digit number. Math doesn't discriminate, darling.
Divide the two-digit number by the one-digit number. If the remainder is zero then the 2-digit number is a multiple and if not, it is not.
To get the three number that is divisible by 4 you will take the difference 4^3 and 4^2.
No. When adding the smallest 2 digit number (= 10) to the smallest 2 digit number (again, 10) the result is a 2 digit number (10 + 10 = 20). When adding the largest 2 digit number (= 99) to the largest 2 digit number (again, 99) the result is a 3 digit number (99 + 99 = 198). As you can see, you'll either get a 2 or 3 digit number, but never a 4 digit number.
A double digit number, triple digit number........
No.