วันอังคารที่ 25 สิงหาคม พ.ศ. 2558

Lab02 : Circle

void setup(){
 size(400,150);
 circle_calc(3);

 
}

void circle_calc(float diameter)
{
 float cir=diameter*PI;
 float area=PI*(diameter/2)*(diameter/2);
 textSize(30);
 fill(0);
 background(#FFFCFC);
 text("R = " + diameter/2,0,30);
 text("Circumference = " + cir,0,60);
 text("Area = " + area,0,90);
 println("Circumference of " + diameter + " diameter circle is : " + area);
 println("Area of " + diameter + " diameter circle is : " + area);
}

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

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

commit เพิ่มเติม : เพื่ม userstory, bookmark

>>  add userstory ทำการเพิ่ม userstory ใน functional tests >>  add bookmark for user เพิ่มระบบ Bookmark โดยการสร้าง model ขึ...