#include<iostream> #include<string> using namespace std; void main() { string str; cout<<"Enter your String for do the process: "; cin>>str; int process=1; for (int i=0;;i++) { if (str[i]>='1' && str[i]<='9') { process*=int(str[i])-int('0'); cout<<int(str[i])-int('0'); if (i+1!=str.length()) cout<<'*'; if (i+1==str.length()) break; } } cout<<"="<<process; //just for stay on the screen cin>>str; }