started programming only like yesterday

Hi hello. How do i make this program print out the digets of a number thats entered, twice? e.g. if entered 456, output should be 445566. Thanks, i know i have to use loop and the division stuff.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  #include <iostream>
using namespace std;
int main()
{
    int n,a,b,c;
     cout << "enter a number";
     cin >> n;

    while(n!=0){
        
         a=n%10;

    }

}
You Joined: Sep 27, 2015 at 5:50am
What have you been doing all this time ?
Never took programming seriously. Last year i only wanted to survive school year.
Topic archived. No new replies allowed.