Categories
Medium Problems

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

จงเขียนโปรแกรมที่รับค่า string ที่เป็นตัวเลข แล้วให้ส่งค่าจำนวนของเลขทศนิยมออกมา

Examples

getDecimalPlaces(“43.20”) ➞ 2

getDecimalPlaces (“400”) ➞ 0

getDecimalPlaces (“3.1”) ➞ 1

Leave a Reply