Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying to create a program for the following question in C++ Write a program that takes an arithmetic expression as a string and returns

I'm trying to create a program for the following question in C++

Write a program that takes an arithmetic expression as a string and returns its value. For example, if the user enters 8*2+1+3 then the program should return 20.

(You must use a null terminated character array to represent a string)

I've successfully completed the program but I'm having some trouble with prioritizing the multiplication and division. The program is computing from left to right without priority. is there a way to add priority?

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions