Categories
Medium Problems

โจทย์ข้อที่ MX0038

จงเขียนฟังก์ชั่นที่รับค่า string และตัวเลข (1 หรือ 0) แล้วส่ง “hello “+string ออกมาหากตัวเลขเป็น 1 นอกเหนือจากนั้นให้ส่ง “bye “+string

Examples

sayhellobye(“jack”,1) ➞ “hello jack”

sayhellobye(“rose”,0) ➞ “bye rose”

Leave a Reply