Home > Back-end > How to use C, decimal turned the cycle of binary code? The cyclic code has to write!
How to use C, decimal turned the cycle of binary code? The cyclic code has to write!
Time:09-22
#include using namespace std; Int main () { Int n, k=0, a [1000]={0}; Cout<& lt;" Please enter a positive integer n!" cin> n; Cout<& lt;" N the remainder is: "; While (n!=0) { A [k]=n % 2; K++; N/a=2; } For (int j=k - 1; J>=0; J -) CoutCoutsystem("pause"); Return 0; }