Information stored on a hard drive consists of programs and data. The proportion of data storage space to program storage space is 10:1. If the total storage space is 22 megabytes, how much will be allocated to programs and how much to data?
Let p= space for programs in MB
Let d= space for data in MB
Proportion of data to programs is d I p= 10 / 1
Total space for both data and programs is 22 MB Express data in terms of total and program space: Then: (22 —p) I p = 10 / 1
(22 —p)=10p 22 = 10p + 1p
22 = 1 1p p=22/11
p=2 MB d= 22 —p
Find data: d= 22 —p d=20 MB
Thus, there will be 20 MB of data and 2 MB of programs
Check: 20 / 2 = 10/1, the correct proportion.
And 20 + 2 = 22 MB, the correct total space
You might also like to view...
Answer the following questions true (T) or false (F)
1. The root of a tree is at level 0. 2. Inorder traversal visits a node before it traverses either of its subtrees.
List various exceptional conditions that have occurred throughout this text. List as many additional exceptional conditions as you can. For each of these exceptions, describe briefly how a program typically would handle the exception, using the exception-handling techniques discussed in this chapter. Some typical exceptions are division by zero, arithmetic overflow, array subscript out of bounds, exhaustion of the free store, etc.
What will be an ideal response?