Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<math.h>
- #include<stdio.h>
- #include <stdlib.h>
- int main (void){
- unsigned long Numero,i,j,suma;
- int vecAux[100];
- check:
- scanf("%lu",&Numero);
- i=0;
- while(Numero!=0){
- vecAux[i]=Numero%2;
- Numero=(Numero)/2;
- i++;
- }
- suma=0;
- for (j=0;j<i;j++){
- suma = ( suma + (vecAux[j] * pow(10,j) ) );
- }
- printf("%lu",suma);
- goto check;
- return 0;
- }
Add Comment
Please, Sign In to add comment