วันเสาร์ที่ 22 สิงหาคม พ.ศ. 2558

lab1-BMI

void setup(){
size(500,500);
background(0);
float weight = 66;
float height = 166;
float x = height/100;
float BMI = weight/(x*x);
//text
fill(255);
textSize(40);
text("height = "+height+" cm.",120,200);
text("weight = "+weight+" kg.",120,250);
text("BMI = "+BMI ,10,300);
}

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

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