Tuesday, September 22, 2009

Lab 6

1) Write a program that prompts
for firstname and lastname. The
combined name should not be longer
than 20 characters long. If it
is longer, give them a second chance.

2) Modify the above to give, instead, as many times as necessary
to fix the input. This should be a
separate program.

3) Modify the above to give three
attempts.

4) Print the first 10 numbers, together with their squares (rather than square roots).

5) Print the first 10 numbers, together with their cubes (rather than square roots).

No comments:

Post a Comment