CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <math.h>
using namespace std;
void express(int p)
{
int n=0,temp,temp2;
while(p>0)
{
cout << p << endl;
cout<<p%10<<"*";
cout<<pow(10,n)<<"=";
temp=p%10;
cout << temp << endl;
temp2 = pow(10,n++);
cout << temp2 << endl;
cout<<temp * temp2<<endl;
p/=10;
}
}
int main() {
int a;
a=657;
express(a);
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run