Perform the unknown mathematical operation

Assignment Help Programming Languages
Reference no: EM131224930

Write a program to test for the case of a math equation entered via the keyboard using the SWITCH-CASE operator.

Types of equations to test for: x + y  x / y   x * y and x - y.

The program is to ask for the following:

1. Get the equation from the keyboard. For example entered : 10 + 7 or x + y

2. Test case of the equation. For example is would be: case '+': (Save the variables x and y in and array.)

3. Display the equation of the case inputted from the keyboard and its calculated solution on the computer screen

4. Also include a case for an unknown operator.

5. And perform the unknown mathematical operation entered in another part of the program.

Example: (x + y) * (x * y)

or x + y - (2 * y) + 4

These would have to be treated as a string and broken up into pieces.

You would have to test each character in the equation entered to perform the math.

You would be creating a simple calculator.

Other case routines could be used also for more complex equations.

6. Loop the program using a WHILE LOOP to get the next equation to be tested and repeat the process.

7. You may use a program from the book and modify it for the requirements requested in this assignment.

Written Report:

a. Will contain a listing of the program.

b. Will contain a Screen-Print image(s) of the data displayed on the PC's screen.

c. A printout of the text file saved on the disk file must be included.

Reference no: EM131224930

Questions Cloud

Preferences of repeat customers : Angus McIndoe wants to modernize his popular restaurant by adapting it more closely to the preferences of his repeat customers. Keeping track of his customers' likes and dislikes.
Know about video cards and monitors : 1. Considering what you know about video cards and monitors, take a step into the future and ask yourself, "If I were buying a new system today, for myself or my family, what would I want?" In asking this question, consider if
Convert the model into a state space form : Convert the model into a state-space form using (a) Akaike's method, (b) Harvey's approach, and (c) Aoki's approach.
Special program to check all over net for plagiarism : Should be referenced if you extract some info from other website because there is a special program to check all over the net for plagiarism.
Perform the unknown mathematical operation : Loop the program using a WHILE LOOP to get the next equation to be tested and repeat the process - Write a program to test for the case of a math equation entered via the keyboard using the SWITCH-CASE operator.
Services produced-suppliers and the primary process flows : In the following operations, isolate a system for analysis and define customers, services produced, suppliers, and the primary process flows. (a) a college; (b) a fast-food restaurant; and (c) a library.
Computers and the future : What do you think the future of computer technology will be 5 to 10 years from now.  For example in the 1960's Star Trek have the flip communicator and then in the 1990's we have the motorola flip cell phone.
Post strategies emergency management professionals might use : Post two strategies emergency management professionals might use to avoid potential negative impacts of mitigation efforts. Explain why these strategies might be effective.
What are the estimated standard errors of the innovations : Fit a fixed-coefficient market model to the Pfizer stock return. Write down the fitted model. - What are the estimated standard errors of the innovations to the αt and βt series?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd