Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having trouble writing this ARM LEGv8 assembly language program that implements a four-function calculator and prompts the user to enter a pair of decimal

I'm having trouble writing this ARM LEGv8 assembly language program that implements a four-function calculator and prompts the user to enter a pair of decimal integers followed by a character that specifies one of the operators using the scanf feature from the C programming language to read the inputs and printf to display the outputs:

+ for addition to compute A+B

- for subtraction to compute A-B

* for multiplication to produce the product A*B

/ for division to produce the quotient A/B.

Input should be the pair of numbers followed by the operand followed by a return. This should be implemented with scanf.

For example

5 5 + [enter]

The program should display the result by performing the indicated operation on the two input operands A and B and use printf to display it to the user. Only these four operators should be allowed and an attempt to divide by zero should be prohibited.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago