void setup() {
size(300, 150);
background(0);
int score = 49;
fill(255);
textAlign(CENTER);
textSize(25);
text("Your score = "+score, width/2, height/2-20);
if (score>=80) {
text("Grade A ", width/2, height/2+20);
} else if (score>=70) {
text("Grade B ", width/2, height/2+20);
} else if (score>=60) {
text("Grade C ", width/2, height/2+20);
} else if (score>=50) {
text("Grade D ", width/2, height/2+20);
} else {
text("Grade F ", width/2, height/2+20);
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น