Write a program
which accepts integers from the keyboard (one per line) and which
finds the largest number input. The user terminates input by typing
Change the program
in Question 1 so that instead of the largest number being found, the
smallest is found. Note that 0 is used to terminate input and is not
to be considered as a number when determining the smallest number.
Note also that negative integers should be ignored.
Write a small
fragment which refuses to let a user go until s/he has typed either
a 'Y' or 'y' (for 'Yes') or an 'N' or 'n' (for 'No') in response to
Finished? (Y/N) p
Finished? (Y/N) x
Finished? (Y/N) 8
Finished? (Y/N) n
following sequence of numbers which is called the Fibonacci sequence.
What is the rule for generating the numbers?
1 1 2 3 5 8 13 21 ...
Write a small
program which generates and writes the Fibonacci numbers stopping
when the first value exceeds 1000.
With the help
of a repeat statement, write a small program which prints random capital
letters across a line until it accidentally writes 'Z', at which time
You are to construct
a MENU system that allows the user (a checkout lifeform at a fast
food outlet) to take an order, and present a bill at the end.
The Order screen will resemble the following:
Your Choices are:
Your Selection: _
Using an inputbox
to harvest CHARACTER choices from the user, cumulatively tally products
until the user requests the bill, then present them with a billing
screen similar to the following:
SHOPPING AT MUCKDONALDS
Your order includes:
Fillet of Roach
Invent prices for
your products, and use labels to position your output accurately.
'Experts' would ensure that the grammar of each bill line was correct
(ie. 1 Big Mucks is not correct) and if a particular product was unordered
it should not appear on the bill. Once you get it working for ONE
order, show your teacher and then allow it to take many orders (one
after the other)
You will find an algorithmic plan here
should you get lost.