C++ question ihave problem with it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahmed12347
    New Member
    • Nov 2018
    • 1

    C++ question ihave problem with it

    Koko has found one more paper, but this time there is an mathematical expression written on it.

    Can you help Koko verify the expression?

    If the expression is right print "Yes", Otherwise print the right answer of the expression.

    Input
    You will be given a number A followed by a sign S, then another number B followed by an equal sign '=' then another number R the result on the paper (0  ≤  A, B ≤  100),(  - 105  ≤  R  ≤  105), S can be ('+', '-', '*') without the quotation.

    Output
    Output either "Yes" (without the quotation) or the right answer depending on the statement.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Half the answer is already in the question.

    "You will be given a number A "
    int A;
    "followed by a sign S"
    char S;
    " then another number B followed by an equal sign '='"
    int B;
    char X;
    "then another number R the result"
    int R;
    ….

    Comment

    Working...