answersLogoWhite

0

If you know that the number input will always be three digits:

output = 10 * (int)(input / 100) + (input % 10);

If you want to idiot proof it (eg. too many digits):

output = 10 * (int)((input % 1000) / 100) + (input % 10);

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you read the code of an integrated circuit?

Code on an integrated circuit includes four common sections: the manufacturer's name or logo, the part number, a part production batch number, and a four-digit code that identifies when the chip was manufactured. The manufacturing date is commonly represented as a two-digit year followed by a two-digit week code.


How do you write a visual basic program to sum the odd number digits of a 12 digit code using division and Mod and while loops?

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


Write a pseudo code to find the sum of digits of a given number reducing them to a single digit?

5


How do you delete a section of code in visual basic 2008?

Go to the code form, select the part of code you wish to delete, and press the delete key. Make sure you are not Debugging at the time, or it will not work.


How do you construct a table for 4321 weighted code and write 9154 using this code?

To construct a table for the 4321 weighted code, assign weights to each digit position from right to left: the rightmost digit has a weight of 1, the next has a weight of 2, then 3, and the leftmost digit has a weight of 4. Each decimal digit is then converted to its corresponding 4321 binary code based on the weights. For the number 9154, the conversion would yield: 9 (1001), 1 (0001), 5 (0101), and 4 (0100). Therefore, 9154 in 4321 weighted code is represented as 1001 0001 0101 0100.

Related Questions

What is the name of two-digit number or a digit and number that is located after the CPT code number and provides more details about the code?

two- digit modifier


What is Geico's five digit insurance code number?

GEICO insurance company five digit code number


What is the name of the two-digit number or a digit and a number that is located after the cpt code number and provides more detail about the code?

Modifier


What is the name of the two digit number or a digit and a number that is located after the cpt code number and provides more detail about the code?

Modifier


What is the name of the two digit number or a number that is located after the cpt code number and provides more detail about the code?

two- digit modifier


Is the code number the pin number?

no-3 digit security code on back


What is the name of the last digit in the bar code number?

check digit


What is Code of engine at VIN number for gm?

The eighth digit of the vin number is the engine code.


What is someone's credit card number and security code?

The credit card number is the 16-digit number on the front of the card; the security code is a three- or four-digit number on the back of the card.


How do i read a 1967 Chevy Chevelle VIN number?

First digit is Divisional code Next 4 are Body style code The 6th digit is Model year The 7th digit is the Plant code The last 6 are the Unit number


How many possible 3 digit area codes can be created without repeating a number?

The number of 3-digit numbers with no repeated digits is simply 10x9x8 = 720, if you allow, for example, 012 as a 3-digit number. There are 10 digits, any of which might be the first digit. The second digit can be any digit except the digit that was used for the first digit, leaving 9 possibilities. The third digit then has 8 possibilities, since it can't be the same as the first or second digit. The actual number of possible area codes will be lower, because there are additional restrictions on the number combinations for a valid area code. For example, in North America (USA, Canada, etc.), the first digit of an area code cannot be 0 or 1 and the middle digit cannot be 9.


How do you delete a build a bear ID number and key code from online?

Go on build a bear, type in your code, look at the top right corner it should say "delete code" hit that then it will delete!