Thursday, September 17, 2009

Programming Projects that may light your fire

I've been meaning to put some additional programming projects on my website.

When I was taking my first programming class, some of these were pretty infectuous.

Let's start with just a couple and we'll see how we do---I have over 100 here...

1. Write a program that asks the user to enter 2 numbers, obtains the 2 numbers from the user, then displays the product of the 2 numbers.

2. Write a program that displays the numbers from 1 to 10. Do not use a loop.

3. Write a program that utilizes looping to display the numbers from 1 to 10.

4. Write a program that asks the user to enter 2 numbers, obtains the 2 numbers, then displays the larger of the two numbers. If the 2 numbers are equal, that display the message "These numbers are the same"

5. Write a program that utilizes looping to display the following table of values:

N 10 * N 100 * N 1000 * N 10000 * N
1 10 100 1000 10000
2 20 200 2000 20000
3 30 300 3000 30000
4 40 400 4000 40000
5 50 500 5000 50000
6 60 600 6000 60000
7 70 700 7000 70000
8 80 800 8000 80000
9 90 900 9000 90000
10 100 1000 10000 10000
11 110 1100 11000 110000

No comments:

Post a Comment