Skip to content

Task: calc math expression Ax^a + Bx^b + ... #12

@iamantony

Description

@iamantony

Coefficients and exponents can be any positive or negatice real number. Input - string. X - some number(s).

class Term
{
public:
    double coeff;
    double exp;
    double val;
    double calc();
}

void calc(string expr)
{
    std::vector<Term> elements = parse(expr);
    double sum = 0.0;
    for (i : elements)
    {
        sum + elements[i].calc();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions