วันพฤหัสบดีที่ 20 สิงหาคม พ.ศ. 2558

Lab1-BMI

void setup(){
  int weight = 71;
  int height = 167;
  float k = height/100;
  float BMI;

  size(400,400);
  background(#66FFCC);
  BMI = weight/(k*k);

  textSize(40);
  fill(0);
  text("height =" +height,20,100);
  text("weight =" +weight,20,140);
  text("BMI =" +BMI,20,180);
}

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

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