#include int main() { char s[102]; gets(s); char* i; int sum = strtol(s, &i, 10); while (*i!='\0') { sum = *i == '*' ? sum + strtol(i + 1, &i, 10) : sum * strtol(i + 1, &i, 10); } printf("%d\n", sum); }