Question about Computers & Internet

Program in turbo C++ for the conversion of decimalcan anyone give me the program in turbo C++ for the conversion of decimal numbers to hexadecimal numbers, octal numbers to decimal numbers. it will be so kind of you.

thanx.

All your solution is at

http://www.c.happycodings.com/Beginners_Lab_Assignments/code18.html

Posted on Dec 07, 2008

Hi,

a 6ya expert can help you resolve that issue over the phone in a minute or two.

best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).

click here to download the app (for users in the US for now) and get all the help you need.

goodluck!

Posted on Jan 02, 2017

This gentleman explains it very well. The trick seems to be to enter the number and then hit the equals sign, and then do the conversion.

Good luck,

Paul

Decimal to Binary and Hexadecimal conversions using casio fx 991MS HYONKOWS

Good luck,

Paul

Decimal to Binary and Hexadecimal conversions using casio fx 991MS HYONKOWS

Dec 20, 2016 | Casio Office Equipment & Supplies

This is not the correct interpretation

To change character set for example in basic you shoud send

Print chr$(27);"A12";

with small character

Print chr$(27),"A01"

The ESC = Escape (27 decimal and 1B in hexadecimal).

To change character set for example in basic you shoud send

Print chr$(27);"A12";

with small character

Print chr$(27),"A01"

The ESC = Escape (27 decimal and 1B in hexadecimal).

Aug 02, 2011 | Zebra LP 2844 Thermal Printer

Press MODE 4 to enter the BASE-N mode. Type in the decimal number, then press BIN to convert to binary. Press DEC to switch back to decimal for the next conversion.

You're limited to numbers in the range [-32768...32767] in binary. You can extend the range if you convert to octal or hexadecimal and then mentally convert each digit to three or four bits.

You're limited to numbers in the range [-32768...32767] in binary. You can extend the range if you convert to octal or hexadecimal and then mentally convert each digit to three or four bits.

Dec 01, 2010 | Casio FX-115ES Scientific Calculator

Here you go:

**http://tinyurl.com/2dup7x**

How about 4 thumbs??

How about 4 thumbs??

Aug 13, 2010 | Computers & Internet

VX8500 does not have an ESN. The VX8500 has an MEID. The MEID is a 14 digit hexadecimal value with the following format:

The decimal representation is calculated as follows:

a). Separate the 14 digit hexadecimal MEID into two parts:

Part 1 – the first 8 digits representing the manufacturer code (digits RRXXXXXX in

the figure).

Part 2 – the last 6 digits representing the serial number. (digits ZZZZZZ in the figure).

b). Convert the hexadecimal value of each part into the decimal equivalent:

Part 1 – 10 decimal digits zero filled.

Part 2 – 8 decimal digits zero filled.

If the decimal equivalent of each part is less than the number of required digits, right align

and zero fill to create the required length.

c). Concatenate Part 1 and Part 2 to create an 18 digit decimal number.

Example:

Hex MEID = AF 01 23 45 0A BC DE

Part 1, manufacturer code is 0xAF012345 = 2936087365

Part 2, serial number is 0x0ABCDE = 00703710

Therefore, the decimal representation of the MEID is 29360 87365 0070 3710

The decimal representation is calculated as follows:

a). Separate the 14 digit hexadecimal MEID into two parts:

Part 1 – the first 8 digits representing the manufacturer code (digits RRXXXXXX in

the figure).

Part 2 – the last 6 digits representing the serial number. (digits ZZZZZZ in the figure).

b). Convert the hexadecimal value of each part into the decimal equivalent:

Part 1 – 10 decimal digits zero filled.

Part 2 – 8 decimal digits zero filled.

If the decimal equivalent of each part is less than the number of required digits, right align

and zero fill to create the required length.

c). Concatenate Part 1 and Part 2 to create an 18 digit decimal number.

Example:

Hex MEID = AF 01 23 45 0A BC DE

Part 1, manufacturer code is 0xAF012345 = 2936087365

Part 2, serial number is 0x0ABCDE = 00703710

Therefore, the decimal representation of the MEID is 29360 87365 0070 3710

Sep 10, 2009 | LG CHOCOLATE VX8500 Cellular Phone

It's a long time since I played with Turbo C but there are a couple of things you could try since problem is clearly in printf formatting.

First try using capital L as " f= %Lf". Lower case 'l' normally precedes an integer variable type and may be forcing conversion to 7 digits.

No luck? Try " f= %.12f". This should force 12 decimal places.

Sorry I don't have Turbo C around anymore so can't try it myself.

First try using capital L as " f= %Lf". Lower case 'l' normally precedes an integer variable type and may be forcing conversion to 7 digits.

No luck? Try " f= %.12f". This should force 12 decimal places.

Sorry I don't have Turbo C around anymore so can't try it myself.

Jul 17, 2009 | Computers & Internet

Hello desireejane,

One method is to do the following

public static long octalToDecimal(String octal) throws NumberFormatException {

// Initialize result to 0

long res = 0;

// Do not continue on an empty string

if (octal.isEmpty()) {

throw new NumberFormatException("Empty string is not an octal number");

}

// Consider each digit in the string

for (int i = 0; i < octal.length(); i++) {

// Get the nth char from the right (first = 0)

char n = octal.charAt(octal.length() - (i+1));

int f = (int) n - 48;

// Check if it's a valid bit

if (f < 0 || f > 7) {

// And if not, die horribly

throw new NumberFormatException("Not an octal number");

} else {

// Only add the value if it's a 1

res += f*Math.round(Math.pow(2.0, (3*i)));

}

}

return res;

}

One method is to do the following

- Convert the octal, hexadecimal or binary to decimal.
- Add or Subtract the decimal normally
- Convert the result back to octal, hexadecimal or binary.

**Convert the octal to decimal:**

public static long octalToDecimal(String octal) throws NumberFormatException {

// Initialize result to 0

long res = 0;

// Do not continue on an empty string

if (octal.isEmpty()) {

throw new NumberFormatException("Empty string is not an octal number");

}

// Consider each digit in the string

for (int i = 0; i < octal.length(); i++) {

// Get the nth char from the right (first = 0)

char n = octal.charAt(octal.length() - (i+1));

int f = (int) n - 48;

// Check if it's a valid bit

if (f < 0 || f > 7) {

// And if not, die horribly

throw new NumberFormatException("Not an octal number");

} else {

// Only add the value if it's a 1

res += f*Math.round(Math.pow(2.0, (3*i)));

}

}

return res;

}

Mar 24, 2009 | Sun Java Programming Language (cdj-275)

Hello,

In the FX-300Ms manual, the same for the FX-82MS, there is no way to use base-n (binary, octal, hexadecimal) calculations.

Sorry.

In the FX-300Ms manual, the same for the FX-82MS, there is no way to use base-n (binary, octal, hexadecimal) calculations.

Sorry.

Feb 22, 2009 | Casio FX-300MS Calculator

To convert numbers you can use the printf() function

printf("%d", x'FF') hex to decimal

printf("%o", x'FF') hex to octal

If you want to save the value in another variables use sprintf

e.g

a = x'FF';

b = sprintf("%d",a)

printf("%d", x'FF') hex to decimal

printf("%o", x'FF') hex to octal

If you want to save the value in another variables use sprintf

e.g

a = x'FF';

b = sprintf("%d",a)

Jan 15, 2009 | Computers & Internet

Sure, here you go:

int main(void) {

int input;

printf("Enter a decimal number: ");

scanf("%d", &input);

printf ("In hexadecimal, that is: %X\n\n", input);

return 0;

}

int main(void) {

int input;

printf("Enter a decimal number: ");

scanf("%d", &input);

printf ("In hexadecimal, that is: %X\n\n", input);

return 0;

}

Oct 05, 2008 | Computers & Internet

May 27, 2017 | Computers & Internet

May 27, 2017 | Computers & Internet

232 people viewed this question

Usually answered in minutes!

×