Your first method · วิธีแรกของคุณ
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · หน้านี้ต้องใช้เบราว์เซอร์ล่าสุด (รองรับ SharedArrayBuffer) กรุณาอัปเดต Chrome, Edge, Firefox หรือ Safari เป็นเวอร์ชันล่าสุด
English
Your first method
Now write a method. Don't write main — the checker calls your method with several inputs and checks what you return. Complete twice so it returns n times two.
ไทย
Method แรกของคุณ
ตอนนี้เขียน method อย่าเขียน main — ตัวตรวจสอบเรียก method ของคุณด้วยอินพุตหลายตัวและตรวจสอบว่าสิ่งที่คุณ return ทำ Complete twice เพื่อให้คืนค่า n คูณสอง
Complete twice(int n) so it returns n times two. Don't write main. · เติม twice(int n) ให้มันกลับค่า n คูณสอง อย่าเขียน main
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่