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

  Examples of predefined control events

How are these examples of predefined control events and its usage in programming? Delegate Object that contains a reference to a method Encapsulates a method provides a way for a program to take alternative

  Build a student record managing system application

Build a student record managing system application

  Creating a security policy by gathering information

Suppose mantle of a security consultant. You are asked to visit a client and gather information to develop a security policy for them.

  Design and run a program that takes a numerical score

Design and run a program that takes a numerical score and outputs a letter grade. Precise numeral scores and letter grades are listed show.

  Implement floyd warshall algorithm in c language

Implement floyd warshall algorithm in c language.add comments for explanation

  Write a program using two-d array to store a user name

Write a program using a 2-D array to store a user name and password (both strings) that will ask the user for his/her user name and then test to see if they are a valid user.

  Explain the project manuals for python and java

Overview: Understand TCP socket programing by developing a (multi-threaded) Web server. You may use Python, Java, or C++ as the programing language. The project manuals for Python and Java are attached to this document, which have provided partial..

  Create gui application that allows the user to enter the

A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie company. Create a GUI application that allows the user to enter the data into text fields.

  Write if statement to display acceptance messag

Write an if statement that displays an acceptance message for an astronaut candidate if the person's weight is between the values of opt_min.

  Write a program that reads a binary number from keyboard

Write a program that reads a 4-bit binary number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, theoutput should be 12.

  Design a program written psuedocode enter total rainfall

Design a program WRITTEN IN PSUEDO CODE that lets the user enter the total rainfall for each of 12 months into an array.

  Design logic for a program contains housekeeping

Design the logic for a program that contains housekeeping,detail loop,and end-of-job modules,and that calculates the service of charge customers owe for writing a bad check.

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