Search
 
SCRIPT & CODE EXAMPLE
 

C

pasar a binario recursivo

//imprime por pantalla el equivalente binario de n
int pasarBinario(int n){
  int bin;

  if(n < 2){ //significa que el numero es 0 o 1
    bin = n;
  }else{
    bin = (n % 2) + (10 * pasarBinario(n/2));
  }

  printf("bin: %d
", bin);
  return bin;
}
Comment

PREVIOUS NEXT
Code Example
C :: cifras de un numero en c 
C :: create point cloud from rgbd image in open3d v0.10 
C :: Turn on the first n Bits in number 
C :: delay in c programming for linux 
C :: ex: C hello world 
C :: looping through an array in c 
C :: fread 
C :: c programming exercises 
C :: vifm preview images 
C :: enum case statement in c 
C :: integer in c 
C :: %= in c 
C :: declare and initialize a string in C 
C :: c functions 
C :: what is O(N^2) in bubble sort method 
C :: pipe system call 
C :: obstacle avoiding robot in c++ program 
C :: modelform prefill with data 
C :: <fileset joomla 
C :: best graphic video template for editing free download 
C :: how to make C program blink on screen 
C :: code to reverse the words in a sentnce 
C :: condition ternaire in c 
C :: simpy process return value 
C :: fina students name by using html backend database 
C :: reverse string in c 
C :: laarvel artisan to create controller model miigration 
C :: or gmode inline image 
C :: A string S is passed as the input. Two words W1 and W2 which are present in the string S are also passed as the input. The program must find the minimum distance D between W1 and W2 in S (in forward or reverse order) and print D as the output. 
C :: c program structure 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =