Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
20171116_TARTAGLIA
#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
2.1.1 Prime numbers in different threads with thread ID
tremendo codigaso ayudantia
acepta el reto 146
HelloWorld
Taco practice
Matriz funcona medio raor aslñdk
Class #2, data types
Pointer Example
22nd HW Switchv0.2
Time Stamp