Thursday, September 24, 2009

Lab 7

1) take in a number, and count how many times the number 3 occurs as a digit.

2) take in a number and reverse it, except where the digit is 3, replace it instead with the digit 5.

3) take in a number and print out all the factors of that number.

4) read in two numbers, x and y. If both x and y are odd, print "both odd." if they are both even, print "both even". if one is even and one is odd, print that.

5) read in a number and tell me whether it is in the range of 5 to 10.

No comments:

Post a Comment