Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
20171116:FUNCIONES
#include <stdio.h> #include <stdlib.h> void imprimirTrianguloTartaglia(short n); void imprimirFilaTartaglia(short f); long binomio(short a, short b); long factorial(long n); int main() { imprimirTrianguloTartaglia(10); return 0; } void imprimirTrianguloTartaglia(short n) { short i; for(i = 0 ; i <= n ; i++) { imprimirFilaTartaglia(i); printf("\n"); } return; } void imprimirFilaTartaglia(short f) { short i; for(i = 0 ; i <= f ; i++) { printf("%8lu", binomio(f, i)); } return; } long binomio(short a, short b) { return factorial(a) / (factorial(b) * factorial(a - b)); } long factorial(long n) { long F = 1; while(n) F *= n--; return F; }
run
|
edit
|
history
|
help
0
String copy
150116_OrdenMatriz
Length width.c
Factorial Descompuesto en Potencias de Numeros Primos
C Pointers Experiment (So bad don't use)
sample.c
PJE
MATRICES DE CARACTERES
a1
150114_MatrizSumaPerimetro