วันพุธที่ 10 กันยายน พ.ศ. 2557

Calculate Grade

 

void setup () {
  background (255, 102, 51);
  size (75, 50);
}

void draw () {
  if (point < 50) {
    text ("Get F", 20, 30);
  }
  if (point >= 50 && point < 60) {
    text ("Get D", 20, 30);
  }
  if (point >= 60 && point < 70) {
    text ("Get C", 20, 30);
  }
  if (point >= 70 && point < 80) {
    text ("Get B", 20, 30);
  }
  if (point >= 80 && point < 100) {
    text ("Get A", 20, 30);
  }
}

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

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