Basic Program to take an integer and returns 0 and 1s of that digit.

Create a Program That will take an integer and return a certain amount of 1 and 0's depending on the number of digits of the integer.
For example, the output should be
Enter an Integer: 543
This is what I got so far
#include <iostream>
#include <cmath>
using namespace std;
int main()
int n,count=0;
cout << "Enter an integer: " << endl;
cin >> n;


Topic archived. No new replies allowed.