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

  Development of a simple menu driven text adventure

Explain why NO_EXIT has been declared and used in defining the contents of the map array, rather than just directly using the value 99999 in the map array definition

  Determine the output displayed in the list box

Determine the output displayed in the list box by the lines of code

  Wap to accept four numbers andcompute

Q. WAP to accept four numbers andcompute their sum,per,grade and average.

  Write program using to take input two integers by while loop

Write a program which uses while loops to perform following steps: Prompts user to input two integers: firstNum and secondNum. (firstNum must be less than secondNum).

  Arrays have been declared with the same data type

As you know when two arrays have been declared with the same data type, one array can be assigned to the other. The assignment statement would look like this

  Write program to assist in monitoring gasoline supply

Write program to assist in monitoring gasoline supply in refinery storage tank. Your program must alert supervisor when supply of gasoline in the tank falls below 10% of the tank's

  Design a grade average program using raptor

Design a grade average program using raptor that will produce the numerical grade average of test scores input by a user

  Determine the number of days in the current month

The second should accept two values, determine the modulus and return the value, which the calling statement should then print out.

  Design program that determines males live in zip code area

Design a program that determines how many males and females live in each of the Zip Code areas in the Student Enrollment Records Set.

  Write loop which processes pay for all workers in array

Print program titles and report headings, then call input function described next to fill in data array. Write loop which processes pay for all workers in array.

  Write program in vb dot net for mortgage payment amount

Write down the program in VB.Net (not Web based) by using the loan amount of $200,000 with the interest rate of 5.75% and 30 year term.

  Perl - write a subroutine to prompt the user

Write a subroutine to prompt the user for any message (like "what is your name?"). The sub will collect the user's answer and return it back to the call (in the main program above the subroutine). Print out the returned string from the sub.

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