In Visual Basic.... Declare a variable called "InputNumb" -->> Do some checking using the len function to ensure that it has four digits Declare a variable "Total" "Total" = left(IinputNumb, 1) + left(right(InputNumb, 3),1) + left(right(InputNumb, 2),1) +right(InputNumb,1) -- >> then return Total to the user in some way.
write an addition story for two 3-digit numbers. write the answer to your story
9999
999999
-999999
75.6
Write a program to convert a 2-digit BCD number into hexadecimal
WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL
Write a program to convert a 2-digit BCD number into hexadecimal
Assuming you've entered a multi-digit number whole number (an integer), then take the modus (%) of the number and 10. E.g., if the number input was 1234, then 1234 % 10 is 4. Thus the final digit is 4. Note that modus 10 is the same as dividing the number by 10 and taking the remainder.
The smallest 5 digit number you can write is 10000.
there could be a part in it like this: int num, digit; int count [10]; do { digit = num%10; num != 10; ++count[digit]; } while (num);
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
Just generate the Fibonacci numbers one by one, and print each number's last digit ie number%10.
6677
.1
1We can not start a three digit number with 0, so 1 is the smallest digit.
write an addition story for two 3-digit numbers. write the answer to your story