Write a program that accepts a string of space-separated float numbers. The program should print the number of long tail numbers, where a float number is said to have a long tail if the number of digits after the decimal point is greater than the number of digits before the decimal point.
i split each floating number with '.' after converting as string and compared the length and incremented the count if length of rhs greater than lhs. but getting error in one of the hidden tests while submitting. is that the approach is true? do we need to have any additional check. week10, programming assignment2.
Write a program that accepts a string of space-separated float numbers. The program should print the number of long tail numbers, where a float number is said to have a long tail if the number of digits after the decimal point is greater than the number of digits before the decimal point.
i split each floating number with '.' after converting as string and compared the length and incremented the count if length of rhs greater than lhs.
but getting error in one of the hidden tests while submitting.
is that the approach is true? do we need to have any additional check.
week10, programming assignment2.