Develop C code for parsing a mathematical expression

已关闭 已发布的 6 年前 货到付款
已关闭 货到付款

A mathematical expression can have variables and operators. The following conditions

are imposed on the construction of an expression.

a. Valid variable names may have at most 6 characters (Allowed characters are

lower/upper case English alphabets, underscore). Space, numbers, and

special characters are not allowed in variable names.

b. Parenthesis is not allowed in the expression.

c. +, -, / and * are the four allowed operators. All operators need two operands.

Unary operators are not allowed.

d. Spaces are allowed between variables, operators. At most 3 spaces may be

allowed.

e. Expression is evaluated from left to right.

Example

1. Valid expression: length * width – area

Variables – length, width, area

Operators: *, -

Note – Spaces are allowed between variables and operators. One space

between variables and operator in the above expression.

2. Valid expression: length*width–area+my_len

Variables – length, width, area, my_len

Operators: *, -, +

No Parenthesis is used

No Spaces used

Develop C code for parsing a mathematical expression as specified by above rules and

determine if it is a valid expression. Print a message “expression is valid” or “expression

is invalid”.

The mathematical expression may be at most 100 characters long. There may be at

most 10 variables in the expression.

If the expression is invalid, print one of the following diagnostic message when

appropriate – “invalid variable” followed by partial name of the variable which is invalid,

“excessive space” for more than 3 spaces.

算法 C 编程 C# 编程 C++编程 软件构架

项目ID: #15829874

关于项目

31个方案 远程项目 活跃的6 年前

有31名威客正在参与此工作的竞标,均价$93/小时

it2051229

Hi there, I went through the requirements and I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details. Thanks. Relevant Skills and Experience C Program 更多

$50USD 在1天里
(1056条评论)
7.7
LiangXiaoJin

Simple. Lets do. Relevant Skills and Experience C programming, Algorithm Proposed Milestones $90 USD - completion

$90USD 在1天里
(81条评论)
7.4
hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ 更多

$80 USD 在2天内
(212条评论)
7.3
dstepanenko

Hello, I'm c++ developer with 6+ years of experience. Also I'm participant and problem writer of many algorithm competitions (Topcoder, ACM ICPC, etc). I have experience on writing parsers of different difficult 更多

$50 USD 在2天内
(31条评论)
6.9
nikolaypavlov93

Hello, I'd like to write your project. Relevant Skills and Experience I'm professional C/C++ programmer. I also wrote a math parser recently as part of a university assignment. Your project won't be difficult. Propo 更多

$160 USD 在2天内
(16条评论)
4.8
Shankarone

I can complete this project in 6 hours time. Message me if you'd like me to start working on it. Should the error message be printed if the number of variables are more than 10? Relevant Skills and Experience have wor 更多

$66USD 在1天里
(42条评论)
4.8
vtatarenko

A proposal has not yet been provided

$133 USD 在3天内
(31条评论)
4.8
jboo7

A proposal has not yet been provided

$50USD 在1天里
(30条评论)
4.6
tuanthanhle

A proposal has not yet been provided

$85 USD 在2天内
(13条评论)
4.1
mehfuza

Dear Client, I'm Computer Engineer and I have experience of programming in C, C++ and Java . I have implemented different types of programs including file input output, data structure, algorithm and games. I write wel 更多

$100 USD 在2天内
(30条评论)
4.7
anjuseneviratne

Hi there, I can do this parser generator within two days. D : [one] [symbol] [two] one : [1-9]* two : [1-9]* symbol[+,-,*] Relevant Skills and Experience C++ algorithms parsing Proposed Milestones $80 USD - completio 更多

$80 USD 在2天内
(11条评论)
3.7
Syedchoudhary

A C#.net application accepting mathematical expression and the interpreting as per specified rules and printing the output. It can be developed as either console or windows app Relevant Skills and Experience my exper 更多

$155 USD 在3天内
(5条评论)
2.7
sakshamkhanna

I have extensive experience in C/C++ environment with specialization in algorithms/optimizations. I have created custom mathematical expression parsers in the past Relevant Skills and Experience C/C++, algorithms, mat 更多

$60USD 在1天里
(1条评论)
2.6
rfurch

A proposal has not yet been provided

$200 USD 在6天内
(1条评论)
2.7
aenkitChauhan

I am passionate towards my work my only agenda is satisfaction towards the customer's need its is the only way through which i can show case my talent. Waiting for a positive response.

$50 USD 在3天内
(1条评论)
0.7
mrshoaib4290

I'm C programmer by career, you want in done in linux or eclipse I can do for both and obviously it will be made sure that it runs properly and as desired. Relevant Skills and Experience C, Algorithms Proposed Milest 更多

$78USD 在1天里
(0条评论)
0.0
emmanuelChidinma

I am highly motivated to work in this project and would love to speak further with you. If you would like to view my previous work, please take a look at my Freelancer Portfolio. Relevant Skills and Experience C, C++ 更多

$155 USD 在3天内
(0条评论)
0.0
angelosdizis

Fast and cleatly defined task in C. Real computation with value input, can also be done if it is desirable. Relevant Skills and Experience C programming, basic sorting algorithms and data structures Stay tuned, I'm 更多

$111 USD 在2天内
(0条评论)
0.0
TylerBMN

I've done many data-parsing programs and I would love to write this program for you as efficient and quickly as possible.

$34USD 在1天里
(0条评论)
0.0
vuongnvh95

Hi. I'm new to freelancer.com so I havent got any reviews yet. So I bid a bit lower than others to get noticed. But I can do this task well =)

$45USD 在1天里
(0条评论)
0.0