ENEE140 solution

C語言程序代寫

Project 2: Integer Arithmetic Expression Evaluator

Project Objective:

<标题>1. get familiar with the process of completing a programming project.

<标题>2. learn how to use and manipulate arrays.

3. understand precedence and associative rules.

4. use program selection: if, if-else, switch statements.

5. use basic loops (while, do-while, for) for repetition.

<标题>Project Description:

<标题>In this project, you will design and implement a program to evaluate an arithmetic

<标题>expression. The arithmetic expression will contain only integers, both positive and negative, and

the following six basic binary operators +, -, %, /, *, and ^ as well as parentheses ().

Your program should read in the expression from an input file. The input file has a

specific format, which is described below. After reading the expression, you first will need to

<标题>evaluate all the negative operands in the expression; next you will evaluate the expression inside

<标题>the parentheses; followed by the power operator ^, then *, /, and % operators, and f

Leave a Reply

Your email address will not be published. Required fields are marked *