See the bottom for how to submit your work.
Due: Before 0800 on next class day
hw.cpp that works like this
(with the user input colored in red):
~/$ ./hw Values for a and b? 111, 1 What do you want? add 10 to a a = 121 and b = 1 |
~/$ ./hw Values for a and b? 1.1, -2.2 What do you want? square b a = 1.1 and b = 4.84 |
The following commands are possible:
add num to a
add num to b
square a
square b
Note: assume that the input is always formatted correctly, so you don't need to check whether the input is valid.
Turn in (Due: 0800 on the next class day)
~/bin/submit -c=IC210 -p=hw07 hw.cpp