Program
275g
(coinjar)
Program
Description:
You have 14 coins in a jar. You take them to the bank
to be counted and they are worth $1.05 If there are
only quarters, dimes, nickels and pennies in the jar
what are the possible combinations of coins that cou
Program213b
(QuantityOrdering)
Program
Description:The cost of a certain item depends on the quantity ordered, as given by the
following table:
Quantity Ordered
0
100
200
300
&
Cost Per item
99
$5.95
199
$5.75
299
$5.40
up
$5.15
Write a program to input t
Program 212a
(passing trains)
Program Description: A freight train travelling 40 mph leaves at 9 o'clock. A passenger train going the
same direction on parallel tracks starts at 11 o'clock going 80 mph. When will the passenger train
overtake the freight t
Program 213a
(weird wages)
Program Description: You just started working as a
programmer. You are paid $10 an hour, with a few
exceptions. You earn an extra $1.50 an hour for any part of
a day where you work more than 8 hours, and an extra
$2.50 an hour f
Program
162b
(PopulationGrowth)
Program
Description: Expanding populations create problems of supply and demand and must be
monitored carefully to alleviate serious problems. A certain country has had a constant growth
rate of 2.9% per year over the past
Program 209b
(throwing three dice)
Program Description: There is a belief among dice players that in
throwing three dice a ten is easier to get than a nine. Can you write
a program that proves or disproves this belief?
Have the computer compute all the po
Program
210c
(Lower-Higher)
Program
Description: Write a program that simulates the guessing game Higher/Lower. The
computer will generate a number between 1 and 100 inclusive. The user will be asked to
guess the number. If the guess is incorrect the prog
Program
209a
(countingnumbers)
Program
Description: You are to read an external file of random integer values until the end of file
is found. As you read the file you should determine how many numbers are less than the value
500 and how many numbers are g
Program
202a
(sequence
withintervalchange)
Program
Description Write a program that will reproduce the following sequence of numbers.
:
Notice the change of intervals:
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 23, 26,29,32, 35, 38, 41, 45, 49, 53, 57, 61, 65, 6
Program 164f
(triple silly sequence)
*
8
Program description: Write a
program that produces the
following outputs. The first line of
output must be written using a ForLoop. The second, using a While-Loop and the third using a Do-Loop.
You look at the prog
Program
166g
(bermuda
triangle)
Program
Description: Write a program that accepts a number of rows between 0 and 9. Produce a
multiplication triangle of n rows. For each row contains entries up to it's row size (i.e row 3 will
have the values 1X3, 2X3, 3X
Program 168h
(challenging crossing cumbers)
Program Description: Write a program to print the
numbers 1 to 23 in an X shape on the printer as shown
below so the two rows intersect at "12."
When you are finished submit the completed
program to your instruc
Program 212a
(passing trains)
Program Description: A freight train travelling 40 mph leaves at 9 o'clock. A passenger train going the
same direction on parallel tracks starts at 11 o'clock going 80 mph. When will the passenger train
overtake the freight t
Program
213c
(if thenstudentclassifier)
Program
Description: Write a program to determine whether a college student is a freshman,
sophomore, junior, or senior based on the number of units that the student has completed.
Input consists of the student numb
Program 213d - ii
(weather person)
Program Description: You have been traveling overseas
and are confused by the reporting of the temperature in
Celsius degrees. If fact you were the only person at the pool
yesterday because you incorrectly converted the
Program
500a
(Mr. Ascii)
Program
Description A computer recognizes characters as a numerical value from an ASCII table.
:
The majority of the printable charters appear in the range of 32 (a space) to 122(lower case z).
[this should fit in your output wind
Program
335h- inal 2003
F
(fatuous function)
dice
Program
Description A certain game requires that two dice be rolled, one at a time. If p and q are
:
the numbers rolled on the first and second die, respectively the value of the roll in the game is
determ
Program
230h
(eggmystery)
Program
Description When 2, 3, 4, 5, 6 eggs are removed at a time from a basket of eggs, the
:
remaining amounts are 1, 2, 3, 4,5 eggs respectively. When 7 eggs are removed at a time, no
eggs remain. What is the least number of e
Program213d
(WeatherForecasting)
Program
Description:It is a belief by some that the common field cricket
chirps are in direct proportion to the current temperature. To get the
temperature in Fahrenheit, add 40 to the number of times a cricket
chirps in a
Program 230b
(Ulam hypothesis)
Program Description: The mathematician Stanislau Ulam
of the University of Colorado hypothesized that any positive
integer would always converge to 1 if treated as follows
If it is odd, multiply it by three and add 1
If it i
Program
230a
Program
Description: Write a program
that prints out in order all of the
integer multiples of 3 or 7 that are
less than 100.
Statements
required loop control, decision making
:
Sampleoutput:
Integers less than 100 that are
evenly divisible by
Program 202t
(calendar crazy)
Program Description: Write a program that
prints a calendar for one month. Input
consists of an integer specifying the first
day of the month (1 = Sunday) and an
integer specifying how many days are
in a month.
Statements req
Program215c
(dontfencemein)
ProgramDescription: You want to build a fence for
your livestock and use your neighbors fence for one
side. You only have 100 yards of fencing material.
You want to build the fence to produce the largest
rectangular area possib
Program
215b
(fasterthana speeding
bullet)
Program
Description: A rifle has a muzzle velocity of 960 feet per second. If it were fired vertically
upward, what would be the maximum height attained by the bullet? If time is expressed in T
seconds, then the
Program
214a
(random
walk)
Program
Description: Someoneisstandingatthecenterofabridgethatis7ftbridgelong.
Theirstrideisexactlyonefoot.Theycantcontrolthedirectiontheyaregoingbutthe
bridgeisverynarrowandtheycanonlygoforwardorbackwardwitheachstep.
Writeapro
Program 213g-Final 2003
(solving linear equations)
Program Description: Write a program that solves the following linear equations in the form Ax + B = 0.
5x - 4 = 0
7x + 12 = 0
0x + 0 = 0
0x + 7 = 0
3.5x - 1.6 = 0
5x + 1.3 = 0
B
X =
A
Read A and B from t
Program 166e
(decimal equivalents
Program Description: Print a table of decimal equivalents of all
proper fractions with denominators 2 through 15 inclusive
with the numerator less than the denominator. Round the
decimal to 5 places.
Statements Required:
Program 166d
(still below minimum wage)
Program Description: An employer
wants to see a breakdown of employee
costs for 3, 4, 5, and 6 employees who
make $4.00 per hour. The employer
wants to see their total wages if they
work 10, 20, 30, or 40 hours week
Program 76a
(number manipulation)
Program Description: Ask a user to enter some digit that
they particularly dislike. The number must be a digit between
1 and 9 but your program does not need to check for this.
Multiply it by 9, then multiply that result
Program 76b
(drawkcab number)
Program Description: This program will
accept up to a six digit number and then output
the number in reverse order.
Required Statements:
output
assignment(input),
Sample Output:
Enter a six digit number:
394321
The number in