public
Description: My school work and other related school things.
Homepage:
Clone URL: git://github.com/xenoterracide/school.git
school / perl / assign2 / README
100644 30 lines (27 sloc) 1.47 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Due Date: April 22, 2008
Exercise-4 (page 131): Problem 8
(actually on page 132)
Create an array of five sayings:
"an apple a day keeps the docor away"
"procrastination is a thief in time"
"the early bird catches the worm"
"handsome is is handsome does"
"too many cooks spoil the broth"
 
each time your, a random saying will be printed. hint: the index of the
array will be the random number generated
Exercise-5 (page 161): Problem 1
physicists tell us that the lowest possible temperature is absolute zero.
absolute zero is -459.69 (note: actually the most current number I can find
is -459.67 which suggests the book was never right) degress Fahrenheit.
a.) Accept input from the user: a beginning temperature, an ending
temperature, and an increment (all fahrenheit).
b.) check for bad input: at temp less than absolute zere and an ending
temperature less than a beginning temperature. the program will send a
message to stderr if either condition is detected. the program will
send a message to stderr if either condition is detected.
c.) print a header showing "fahrenheit celsius " print all the values from
the beginning temperature to the ending temperature. use a looping
mechanism. the conversion formula is C = (F - 32) / 1.8
 
* bonus: make sure the user enters a number, either decimal or floating
* point; e.g., 5.5, .5, or 5. (note: this is stupid it should just convert
* it instead of making the users life harder)