Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Adombang Munang Mbomndih
/
iax0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e3a6b801
authored
Oct 25, 2018
by
Adombang Munang Mbomndih
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add calculator algorithm
parent
6d07320a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
homework1/homework1 algorithm.txt
homework1/homework1 algorithm.txt
0 → 100644
View file @
e3a6b801
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment