Square a number · ยกกำลังสองตัวเลข
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
Square a number
Return n * n. Java is strict about types, so square is declared to return an int and your value must match.
ไทย
ยกกำลังสองตัวเลข
คืนค่า n * n Java คัดค关于 types, ดังนั้น square ถูกประกาศให้คืนค่า int และค่าของคุณต้องตรงกัน
Complete square(int n) so it returns n * n. Do not write main — the checker calls your method. · เติม square(int n) ให้มันกลับค่า n * n อย่าเขียน main — เครื่องตรวจสอบจะเรียกวิธีของคุณ
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่