Homework 1
Due Monday, December 4 at Midnight
normally this would be due on Monday, November 27, but this is
Thanksgiving weekend and we've been having computer issues
Sum of Powers
(60 PTS) 1. First comes the general problem description, then the
parts you should do. You are going to develop a program that will
ask a user to enter two things
Thus you are finding a sum like the following So you are going to be getting n and k from the user and then finding the sum of powers. You want to make sure you feedback the numbers they summed, the power they raised each number before summing and what the actual sum is. The parts
Sum of Powers Revisited (40 PTS) 2. You are going to modify your solution to the first problem, though you are not required to write pseudo code or develop a flow chart. You are going to keep adding another term to the series until the user tells you to stop. Now you want to ask the user just one question
Now you will feedback the sum of powers and what the power was and how many terms you summed. You also need to ask them whether they want to continue. You decide how you want them to let you know whether you should sum another term or quit. You are likely to use a 1 for continue, and a -1 to stop. |