วันเสาร์ที่ 21 กันยายน พ.ศ. 2556

Factorial




int fac(int n){
if(n==1){
return n;
}else{
return fac(n-1)*n;
}

}
void setup(){
background(2);
size(100,100);
textSize(20);
text(fac(6),50,50);
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น