V
V
vladdof2018-10-06 23:29:50
C++ / C#
vladdof, 2018-10-06 23:29:50

Calculator with brackets in C?

Good afternoon.
I can't cope with the implementation of the calculator, which would take into account the precedence and parentheses in the C language.
Without using all sorts of libraries, you can only atoi, write.
I would be grateful for help and answers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cheypnow, 2018-10-06
@Cheypnow

The easiest way to do this is to use reverse Polish notation.
Google the shunting yard algorithm, you will find an implementation in C.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question