題目
Arithmetic Operators
舉例輸入
3
4.5
舉例輸出
13.5
15
解析
大致上就是測驗會輸入一組數字
然後會再main方法裡面分別呼叫方法印出面積與邊長
除了稍微注意先乘除後加減...基本沒甚麼問題
function getArea(length, width) {
let area;
area = length * width;
return area;
}
function getPerimeter(length, width) {
let perimeter;
perimeter = (length + width) * 2;
return perimeter;
}
本日心得
是的,前幾天就是這麼無聊
我會在這幾天拼命狂刷後面的題目的