I am supposed to make a program that takes in an infix turns it to prefix, and then solves it using stack. Suppose if the user enters the infix: (3+4)2/2+4/28 we would get the prefix: +/+3422/428 and the evaluated result: 23. My program works fine with normal operations like +, -, *, and / but it is also supposed to work with sin, cos and log. My stack is a char stack, and i dont understand how im supposed to incorporate the ability to use sin cos and log. Any tips?
- Infix to prefix conversion will have 2 Marks.
- Getting the result of basic infix equation like (3+46)2/12+4/28 will have 2 Marks.
- Getting the result of complex euqation like 3log(100)+sin^2(90)-cos(log(1000))+2-34+12 will have 2 Marks.
- Extra functionality of your program based on the usage of customer will have 1 Marks. This part include( The program did not accept ++, --, //,%%) and also the user should be able to use your program without any knowledge or programming!