423,850 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,850 IT Pros & Developers. It's quick & easy.

C++ question ihave problem with it

P: 1
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.
2 Weeks Ago #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 946
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;
.
1 Week Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.