بکندباز

تابعی بنویسید که در عددی بین 1 تا 1000 را به عنوان آرگومان بگیرد. آن را به حروف تبدیل کرده و در خروجی برگرداند.

نمونه های ورودی و خروجی

numberstoletters(23) ➞ twenty three
numberstoletters(405) ➞ four hundred and five
numberstoletters(100) ➞ one hundred
numberstoletters(855) ➞ eight hundred and fifty five
numberstoletters(213) ➞ two hundred and thirteen

نکته: به and بعد از صدگان توجه شود

numberstoletters(23)  ➞ twenty three
numberstoletters(405)  ➞ four hundred and five
numberstoletters(100)  ➞ one hundred
numberstoletters(855)  ➞ eight hundred and fifty five
numberstoletters(213)  ➞ two hundred and thirteen

پاسخ های کاربران به این تمرین

Ahw8ww88w
امتیاز:‌ 210
0 0
‎PHP‎
20 بهمن 1401

برای مشاهده پاسخ باید ابتدا وارد شده و قفل پاسخ را باز کنید

نظرات

*
*