Comp Science Assignment Ch.1
Comp Science Assignment Ch.1
SON C. LE
CHAPTER 1 ASSIGNMENTS
a. The first device known to carry out calculations was the Pascaline -
g. A linker links and loads the object code from main memory into the
source program. - T
problem. - T
Le 3
functions. - T
stored in main memory will be lost when the computer is turned off, so
storage.
5. The operating system monitors the overall activity of the computer and
provides services.
application programs.
the library, and is used in the program to create the executable code.
scores.
(testscore2*weight2) + (testscore3*weight3) +
(testscore4*weight4))/4
17. Design an algorithm to find the price of the pizza per square
inch:
c. Calculate the price of the pizza per square inch using this formula:
c. Get the amount of gas put in the car on the first day: Monday
d. Get the amount of gas put in the car on the second day: Tuesday
e. Get the amount of gas put in the car on the third day: Wednesday
f. Get the amount of gas put in the car on the fourth day: Thursday
g. Get the amount of gas put in the car on the fifth day: Friday
i. Calculate the total gasoline totalgas that was put in the car using
this formula:
Thursday + Friday
Calculate the selling price sellprice of the item using this formula:
sellprice = 1.6*origprice
s = (a + b + c)/2
area = sqrt(s(s-a)(s-b)(s-v))
otherwise
If (balance <= 0)
otherwise
Otherwise
otherwise
Le 9
otherwise
f. If (testscore < average) then show the name associated with the
testscore
Otherwise
testscore