424,298 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,298 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.
Nov 30 '18 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 981
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;
.
Dec 1 '18 #2

Post your reply

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