Suppose you need to accommodate measurements in inches and centimeters on your new Web site. Both units need to be accurate to two decimal places. The maximum length you need to represent is 50.05 inches.

a. How many characters do you need to represent the maximum value in
inches?
b. How many characters do you need to represent the maximum value in
centimeters


a. 5 characters, including the decimal point.
b. 50.05 inches * 2.54 cm/inch = 127.127 cm, which is 7 characters including the decimal point, but the specification said that accuracy would only be to two decimal places. So the maximum length would be 6 characters.

Computer Science & Information Technology

You might also like to view...

Insertion of messages into the network from a fraudulent source is a __________ attack.

A. content modification B. masquerade C. source repudiation D. sequence modification

Computer Science & Information Technology

Outline an implementation for the Election service that ensures that its records remain consistent when it is accessed concurrently by multiple clients.

What will be an ideal response?

Computer Science & Information Technology

The most popular sound file format for downloading and storing music is ____.

A. AU B. AIFF C. MP3 D. MIDI

Computer Science & Information Technology

Chart placeholders are consistent regardless of the chart layout selected

Indicate whether the statement is true or false

Computer Science & Information Technology