division recursiva
C
// devuelve el cociente de la division entera entre dividendo y divisor
// (no se puede usar el operador cociente)
int cociente(int dividendo, int divisor){
int res = 1;
if(dividendo - divisor < 0){//caso base 1
res = 0;
}else if( dividendo - divisor == 0){//caso base 2
res = 1;
}else{
res = res + cociente(dividendo - divisor, divisor);
}
return res;
}
Also in C:
- Title
- get a remote branch git
- Category
- C
- Title
- how to remove \n from a string c
- Category
- C
- Title
- c printf right pad with space
- Category
- C
- Title
- how to do matrix multiplication in c
- Category
- C
- Title
- c allocate array
- Category
- C
- Title
- disable gnu++11 option
- Category
- C
- Title
- what are the causes of memory leaks in c
- Category
- C
- Title
- Assign integer value to pointer?
- Category
- C
- Title
- primo
- Category
- C
- Title
- powershell list big files
- Category
- C
- Title
- undefined symbols for architecture x86_64 in c
- Category
- C
- Title
- c bit access union
- Category
- C
- Title
- /usr/bin/mandb: fopen /var/cache/man/7935: Permission denied
- Category
- C
- Title
- diferencia entre * y & en c
- Category
- C
- Title
- array length c
- Category
- C
- Title
- battlefield4u.com
- Category
- C
- Title
- ordenar un vector
- Category
- C
- Title
- scanf read line
- Category
- C
- Title
- c matrix sintax
- Category
- C
- Title
- how to free a 2d array correctly
- Category
- C
- Title
- div
- Category
- C
- Title
- how to check the size of a file in linux c
- Category
- C
- Title
- xamarin command listview button
- Category
- C
- Title
- binary tree geekd for geeks
- Category
- C
- Title
- jock cranley
- Category
- C
- Title
- print in c
- Category
- C
- Title
- triangulo
- Category
- C
- Title
- vbl share price
- Category
- C
- Title
- powershell search big files
- Category
- C
- Title
- delete docker image repository none
- Category
- C
- Title
- PS1 modified lags
- Category
- C
- Title
- mangoosejs
- Category
- C
- Title
- python web crawler
- Category
- C
- Title
- how can i remove a specific item from an array
- Category
- C
- Title
- c array
- Category
- C
- Title
- how to put a char into a string c
- Category
- C
- Title
- docker pull command
- Category
- C
- Title
- duplicar cadena
- Category
- C
- Title
- is c and c++ platform independent
- Category
- C
- Title
- Print the number 0 using write()
- Category
- C
- Title
- arduino digital input pins
- Category
- C
- Title
- how to do Employing defensive code in the UI to ensure that the current frame is the most top level window
- Category
- C
- Title
- california
- Category
- C
- Title
- changing tuple values
- Category
- C
- Title
- stack
- Category
- C
- Title
- potencia recursiva
- Category
- C
- Title
- entity framework core discard changes
- Category
- C
- Title
- restapi
- Category
- C
- Title
- sustituir un dígito por otro
- Category
- C
- Title
- double return type in c
- Category
- C
- Title
- how to print in c
- Category
- C
- Title
- sdl bouton
- Category
- C
- Title
- typedef in c
- Category
- C
- Title
- mongodb delete all documents
- Category
- C
- Title
- printf n characters c
- Category
- C
- Title
- buscar caracter
- Category
- C
- Title
- c program to find the sum of given number using recursion
- Category
- C
- Title
- add border to image android
- Category
- C
- Title
- es fibo
- Category
- C
- Title
- change plot line color in matplotlib
- Category
- C
- Title
- uninstall elgg from hostgtor
- Category
- C
- Title
- for loop in c
- Category
- C
- Title
- c program to find the sum of given number
- Category
- C
- Title
- C why is is & nit used in scan f fr string
- Category
- C
- Title
- get configuration script window 7
- Category
- C
- Title
- c check if char is number
- Category
- C
- Title
- c producer consumer pthread semaphore
- Category
- C
- Title
- passing 'const char *' to parameter of type 'char *' discards qualifiers
- Category
- C
- Title
- what is x:Name Xamarin forms
- Category
- C
- Title
- pi in c language
- Category
- C
- Title
- strcat in c
- Category
- C
- Title
- command line coursera
- Category
- C
- Title
- How to make a printf in c
- Category
- C
- Title
- 233 pounds to inr
- Category
- C
- Title
- latex font sizes
- Category
- C
- Title
- c get first n characters of string
- Category
- C
- Title
- time now c
- Category
- C
- Title
- use of matplotlib inline
- Category
- C
- Title
- piramide
- Category
- C
- Title
- iterate through map
- Category
- C
- Title
- CL/cl.h: No such file or directory
- Category
- C
- Title
- c copy string
- Category
- C
- Title
- lazer codechef
- Category
- C
- Title
- accessing elements 2D array using pointers
- Category
- C
- Title
- c check if file was created
- Category
- C
- Title
- how to print the address of a pointer in c
- Category
- C
- Title
- what is a long long int in c
- Category
- C
- Title
- ModuleNotFoundError: No module named 'easydict'
- Category
- C
- Title
- measure time in c
- Category
- C
- Title
- prime number
- Category
- C
- Title
- iterar en map
- Category
- C
- Title
- chat c socket tcp geeksforgeeks
- Category
- C
- Title
- es palindromo
- Category
- C
- Title
- generate all permutations of string
- Category
- C
- Title
- does strcat null terminate
- Category
- C
- Title
- css selector for sibling element
- Category
- C
- Title
- variadic function in c
- Category
- C
- Title
- java.lang.SecurityException: Permission denied (missing INTERNET permission?)
- Category
- C
- Title
- change a attribute in dataframe
- Category
- C
- Title
- how to check where the last char is in a string c
- Category
- C