void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// 第一題
float mid_score = 80 * 0.2;
float final_score = 80 * 0.3;
float homework_score = 3.2 * 8 * 0.4;
float other_score = 80 * 0.1;
float total_score = mid_score + final_score + homework_score + other_score;
Serial.print("Total score is: ");
Serial.println(total_score);
// 第二題
float ms = 90 * 0.2;
float fs = 90 * 0.3;
float hs = 3.2 * 4 * 0.4;
float os = 70 * 0.1;
float ts = ms + fs + hs + os;
Serial.print("Total score is: ");
Serial.println(ts);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}