|

CyberSlug Rules!
Classes
Class
Syllabus
Grading Policy
Labs
Interact
Login
-
enter system
-
get attendance
-
submit work
-
take lab quiz
-
check scores
Help
Help me!
Links
Staff only
Datacare Ahshay
| |
Machine Language Example:
Consider this simple problem:
Write a computer program that computes the average of 3 given scores.
What are the steps?
- What is the first score?
- Computer needs to ask the user to input a number and store it in
memory for later use
- What is the second score?
- Computer needs to ask the user to input a number and store it in
memory for later use
- What is the third score?
- Computer needs to ask the user to input a number and store it in
memory for later use
- If you now have the three scores, you can add them up and compute the
average:
- Get the first number from memory (into Accumulator)
- Add the second number (to accumulator)
- Add the third number (to accumulator)
- Divide the Acc by 3
- Store result in memory
- Display results to user
Try it
|