Ultra Fast Mathematician

mail@pastecode.io avatar
unknown
c_cpp
3 years ago
348 B
9
Indexable
Never
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a, b;
    cin>>a>>b;
    int c=0;
    for (int i = 0; a!=0; i++)
    {
        int dig1=a%10,dig2=b%10;
        cout<<c<<" ";
        if(dig1!=dig2)
            c= c+(pow(10,i));
        a/=10;
        b/=10;
    }       
    cout<<c<<" "<<endl;
    return 0;
}