2535 - 三个数的加乘法题 (2553)
输入含一步乖法运算和一步加法运算的式子,让计算机进行计算。
Input
36*3+5=
Output
36*3+5=113
Examples
Input
91487*2+8487=
Output
91487*2+8487=191461
Solution C++
#include <stdio.h> #include <iostream> #include <string> using namespace std; int main() { //freopen("in.txt", "r", stdin); char s[111]; int a,b,c; scanf("%s",s); sscanf(s,"%d*%d+%d=", &a,&b,&c); printf("%s%d", s,a*b+c); }