RenaissanceMan
04-10-2001, 06:49 PM
Hello, I am currently taking a night class at the local college in computer science, the class is really an introductory course touching on many areas of the computer industry. We have reached a point in this class that has become VERY difficult for me. We are to write a design plan (Algorithm) based on information provided below, the fact that it is easter break makes it impossible for me to get in touch with the instructor. I am no spring chicken here so I was hoping for some input from anyone with knowledge in this area. I have provided an example of how the results should look below. And below the example is the assignment labeled program 1
Please understand I am not really looking for someone to give me a completed algorithm, (although that would be nice) I am looking for some direction and perhaps just a good start….
Thanks to anyone who can help me out.
Example:
Overview:
Create a program plan that allows input of two integer values and finds and displays the sum, product and difference of the two numbers.
Variables:
Num1 integer
Num2 integer
Sum integer
Prod integer
Diff integer
Task List:
Input two integer values
Output sum, prod, diff
Calculate sum, prod, diff
Detailed Program Plan:
Start
Display “please enter first number”
Enter num1 as integer
Display “please enter second number”
Enter num2 as integer
Sum = num1 + num2
Prod = num1 x num2
Diff = num1 – num2
Display “sum is”, sum
Display “prod is”, prod
Display “diff is”,diff
Stop
Test:
Entered num1 as 5
Entered num2 as 7
Sum is 12
Prod is 35
Diff is –2
Here is the Question for the Algorithm (design plan)
I must include the following:
Overview statement of problem
Variable names and their data types
Task list
Detailed program plan
Test data and walkthrough
Program 1:
A foot is 12 inches in length. Write a program algorithm that will read in a value that represents a number of inches and then calculate and display the equivalent length in feet. In addition, using the same value, calculate and display the number of times a segment of that length appears in 1 foot.
Please understand I am not really looking for someone to give me a completed algorithm, (although that would be nice) I am looking for some direction and perhaps just a good start….
Thanks to anyone who can help me out.
Example:
Overview:
Create a program plan that allows input of two integer values and finds and displays the sum, product and difference of the two numbers.
Variables:
Num1 integer
Num2 integer
Sum integer
Prod integer
Diff integer
Task List:
Input two integer values
Output sum, prod, diff
Calculate sum, prod, diff
Detailed Program Plan:
Start
Display “please enter first number”
Enter num1 as integer
Display “please enter second number”
Enter num2 as integer
Sum = num1 + num2
Prod = num1 x num2
Diff = num1 – num2
Display “sum is”, sum
Display “prod is”, prod
Display “diff is”,diff
Stop
Test:
Entered num1 as 5
Entered num2 as 7
Sum is 12
Prod is 35
Diff is –2
Here is the Question for the Algorithm (design plan)
I must include the following:
Overview statement of problem
Variable names and their data types
Task list
Detailed program plan
Test data and walkthrough
Program 1:
A foot is 12 inches in length. Write a program algorithm that will read in a value that represents a number of inches and then calculate and display the equivalent length in feet. In addition, using the same value, calculate and display the number of times a segment of that length appears in 1 foot.