submit p1pr12wk p1pr12wk.cpp
submit p2pr12wk p2pr12wk.cpp
submit p3pr12wk p3pr12wk.cpp
~/$ ./p1
10 : 2 -1 3 0 -9 0 3 8 7 -4
#zeros = 2, #negatives = 3, #positives = 5
Positives = 2 3 3 8 7
|
~/$ ./p1
15 : 23 -9 -3 -2 14 2 5 5 18 -4 7 5 6 -1 1
#zeros = 0, #negatives = 5, #positives = 10
Positives = 23 14 2 5 5 18 7 5 6 1
|
we ask you please don't feed my shark panic may ensue . | | | | don't panic
the rain in spain falls mainly in the plain or so eye ear . | | | | | | in the eye
~/$ ./p2
2 are a
foobar.txt
File 'foobar.txt' not found! |
~/$ cat msg2.txt there are good resons to refuse a job at subway . ~/$ ./p2 2 are a msg2.txt good job |
~/$ cat msg3.txt my only real regret is that i didn't make a better practicum ... that was probably a bit long and i fear that great pain may have been caused . ~/$ ./p2 3 is that better msg3.txt that practicum was great |
~/$ cat msg1.txt If you see me then meet someone else who me and you think seems at least kind of silly then noon or sometime thereafter is probably too late . ~/$ ./p2 3 who seems then msg1.txt meet me at noon |
~/$ cat msg4.txt look over there at the tree ; it is pink I had no idea such things exist ; if you try to envision one you'll fail because there isn't anything quite like such a tree ; it is small because only small plants avoid being cut down ; you do not have to take my word for this since believe it or not we live near one ; at least you do , maybe I do not ; who knows . ~/$ ./p2 6 over it had you because do msg4.txt there is no try there is only do or do not |
|
./p3 < in3a.txt
runs program p3 sending it the contents of file in3a.txt as the
input to standard in, as if that's what the user had typed.
~/$ ./p3 5 x 10 draw row 2 draw col 4 show | | ----+----- | | draw @ 3 7 show | | ----+----- | + | quit |
~/$ ./p3 6 x 9 draw row 2 draw col 7 draw @ 0 8 draw @ 5 0 show |+ | -------+- | | + | quit |
~/$ ./p3 5 x 10 draw row 0 draw row 4 draw col 0 draw col 4 show +---+----- | | | | | | +---+----- quit |
~/$ ./p3 5 x 20 draw row 0 draw row 4 draw col 0 draw col 19 draw row 2 draw col 10 draw @ 1 1 draw @ 3 5 show +---------+--------+ |+ | | +---------+--------+ | + | | +---------+--------+ quit |
~/$ ./p3 < in3a.txt
+---+---+---+---+---+
| + | | + | | + |
+---+---+---+---+---+
| | + | | + | |
+---+---+---+---+---+
| + | | + | | + |
+---+---+---+---+---+
| | + | | + | |
+---+---+---+---+---+
| + | | + | | + |
+---+---+---+---+---+ |