วันพุธที่ 2 กันยายน พ.ศ. 2558

Lab03 : Calc_Grade

void setup() {
  size(250, 250);
  background(33);
  calc_grade(80);
}

void calc_grade(int score) {
  String grade="";
  if (score<=100) {
    grade="A";
    if (score<80) {
      grade="B";
      if (score<70) {
        grade="C";
        if (score<60) {
          grade="D";
          if (score<50) {
            grade="F";
            if (score<0) {
              grade="score below 0";
            }
          }
        }
      }
    }
  } else {
    grade="score over 100";
  }
  textSize(20);
  fill(#16AA03);
  String texts="Score : " + score + "\nGrade : " + grade;
  text(texts, 75, 120);
}



Problem
1.ใช้ตัวแปรชื่อ text แล้วตัวหนังสือไม่ขึ้น
    how to fix : เปลี่ยน text เป็น texts

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

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

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

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