You are on page 1of 1

SISTEM KOMPUTER

UNIVERSITAS SRIWIJAYA
NAMA : DODI SISWANTO
NIM : 09101001048
#include <stdio.h>

#include <conio.h>

unsigned long int fact(int f){

if(f<2) return 1;

else return f*fact(f-1);

int komb(int n, int r){

return(fact(n)/(fact(r)*fact(n-r)));

int main(){

int i, j, n=10;

for(i=0; i<n; i++){

for(j=0;j<=i;j++){

printf("%d ",komb(i,j));

printf("\n");

getch();

You might also like