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?
Similar Questions
  1. Out put for this code by DSA IN travesing#include <iostream> using namespace std; struct Node { int data; Node* left; Node*
    1. answers icon 1 answer
  2. ineed help with c++.i am using code blocks and i have a problem with the compiler. when I run this code ¡é # include
    1. answers icon 3 answers
  3. when i compile the following, many erors appear// include necessary libraries #include <iostream> #include <cmath> // use std
    1. answers icon 0 answers
  4. What will be the output of below c++ code.//c++ code for auto increment/decrement operators. #include<iostream> using namespace
    1. answers icon 1 answer
more similar questions