Your first function · ฟังก์ชันแรกของคุณ
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 function
Now write a function. Don't write main — the checker adds one that calls your function with several inputs (your code is saved as student.c). Complete twice so it returns n times two.
ไทย
ฟังก์ชันแรกของคุณ
ตอนนี้เขียน ฟังก์ชัน. อย่าเขียน main — ตัวตรวจสอบเพิ่มอันหนึ่งที่เรียกฟังก์ชันของคุณด้วยอินพุตหลายตัว (โค้ดของคุณถูกบันทึกเป็น student.c). เติม twice เพื่อให้กลับค่า n คูณสอง
Complete int twice(int n) so it returns n times two. Do not write main. · เติม int twice(int n) ให้มันคืนค่า n คูณสอง. อย่าเขียน main
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่