Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
funcion dar vuelta numero
#include <stdio.h> unsigned long sumaDescendente(unsigned long); int main(void) { unsigned long numero; do { scanf("%lu", &numero); if (numero != 0) printf("%lu\n", sumaDescendente(numero)); } while (numero != 0); return 0; } unsigned long sumaDescendente(unsigned long copiaNumero) { unsigned long suma = copiaNumero; unsigned long divisor = 10; while (copiaNumero % divisor != copiaNumero) { suma = suma + (copiaNumero % divisor); divisor = divisor * 10; } return suma; }
run
|
edit
|
history
|
help
0
1/23/2017
Finding power using recursion
lab5!
150112_FuncionesOrdenArray
co_1
c4
Midterm practice, turn into for loop
14th Feb Project
Beginning linux
strcopy