12345678910111213141516
#include <iostream> using namespace std; int main(){ int rem; int num; int i; cout << "Type in decimal number"; cin >> num; cout << endl; for (i = num; i > 0; i / 2) { rem = i % 2; cout << "Binary:" << rem; } } return 0;
12345
for (num; num > 0; num / 2) { rem = num % 2; cout << rem; }