can any one please dry run this code
#include<iostream>
using namespace std;
int main()
{
intnum,factor=1,temp;
cout<<"Enter any integer value"<<endl;
cin>>num; //number given by the user is 10123.
temp=num;
while(num>0)
{
num=num/10;
factor=factor*10;
}
while(factor>1)
{
factor = factor/10;
cout<<temp/factor<<endl;
temp = temp % factor;
}
return 0;
}
1 answer
what, you don't have a c++ system?