{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW3BasicAssembly

# HW3BasicAssembly - 9 Divide by 2 For your output Display...

This preview shows page 1. Sign up to view the full content.

CS 30 HW3 - First Assembly Program Goal: Perform user input / output with assembly Perform mathematical calculations Your assignment this week is to write an assembly program that takes some user input, performs various mathematical manipulations, and outputs the result. Here are the instructions: PhoneAFriend: Write a program that performs the following numeric transformations. 1) What are the first 3 digits of your phone number? (do NOT include the area code) 2) Multiply by 80 3) Add 1 4) Multiply by 250 5) What are the last four digits of phone number? 6) Add in the last four digits of phone number 7) Add in the last four digits of phone number again 8) Subtract 250
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 9) Divide by 2. For your output: Display the result after every step. You do not need to check for valid input each time. For the final answer, start the line with "Final Answer: " then print out the sum ON THE SAME LINE. A sample run of this program would look like: What are the first 3 digits of your phone number? 805 Multiply by 80 64400 Add 1 64401 Multiply by 250 16100250 What are the last four digitals of phone number? 5555 Add in the last four digits of phone number 16105805 Add in the last four digits of phone number again 16111360 Subtract 250 16111110 Divide by 2 Final Answer: 8055555 This assignment will be turned in electronically via turnin...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online