Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A_141211_Tartaglia
//Title of this code #include <stdio.h> void imprimirTrianguloTartaglia(short nf); void imprimirFilaTartaglia(short f); long binomio(short m, short n); long factorial(short n); int main(void) { short nfilas; printf("Cuántas filas... "); scanf(" %hd", &nfilas); imprimirTrianguloTartaglia(nfilas); return 0; } void imprimirTrianguloTartaglia(short nf) { short fila; for(fila = 0 ; fila <= nf ; fila++) { imprimirFilaTartaglia(fila); printf("\n"); } return; } void imprimirFilaTartaglia(short f) { short b; for(b = 0 ; b <= f ; b++) { printf("%7ld", binomio(f, b)); } return; } long binomio(short m, short n) { return factorial(m) / (factorial(n) * factorial(m - n)); } long factorial(short n) { long F = 1; while(n) F *= n--; return F; }
run
|
edit
|
history
|
help
0
Finding the second largets value v0.6
Programação em C, testes
Working except for the thread part. LUL
6 ejercicio trabajo semanal 4
Pointer
pointer**
bitwise operations
Assignment 7
Assignment 5 part 2 v2
Fibonacci multiplos de 3 y menores que 30