Add calculator algorithm

parent 6d07320a
Showing with 28 additions and 0 deletions
Step 1: Start [Start of algorithm]
Step 2: Declare variable startValue
Step 3: Declare variable step
Step 4: Declare variable lowerLimit
Step 5: Declare variable X
Step 6: Declare variable Y
Step 7: Declare variable Counter
Step 8: Asign 0 to counter variable
Step 9: Read start value from keyboard
Step 10: Convert start value to real number
Step 11: Asign converted value to startValue variable
Step 12: Read step from keyboard
Step 13: Convert step to real number
Step 14: Asign converted value to step variable
Step 15: Read lower limit from keyboard
Step 16: Convert lower limit to real number
Step 17: Asign converted value to lowerLimit variable
Step 18: Print all read values
Step 19: Asign start value to variable X
Step 20: Print column headers y and f(x)
Step 21: Compute Y for current X
Step 22: Print result row
Step 23: Increment counter by 1
Step 24: Asign ((counter * step) + startValue) to variable X
Step 25: If (lowerLimit <= Y && counter < 15) goto step 21
Step 26: Print 'Done!'
Step 27: Stop [End of algorithm]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment