• 0

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

Equation with up to 3 unknowns and nested parentheses in string form.

As you can see in the photo and the title this is the 4th level of the problem. Up until now, I am able to take user input in string format: c1x1+c2x2+...=b1 and store coefficients and b1 in an array. I am doing this by reading the string one by one.

Getting to the innermost parentheses is also not a problem but, after taking the value and evaluating what's inside the parentheses, I don't know how to put it in the original one and deal with situations like distributive property => (…+(…)3.265x2). Unknowns are identified as x1, x2, x3, x4, x5 and I'm using float for the coefficients c1, c2 and b1.

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]