Nth Decimal Place

Nth Decimal Place: The program must accept three integers XY, and N as the input.  The program must print integers present in the Nth decimal place right to decimal point when X is divided by Y as the output.

Example Input/Output 1:
Input:
22 7
12 
Output:
7

Example Input/Output 2:
Input:
4 2
1
Output:
0

m,n=map(int,input().split())
x=int(input())
c=m/n
a=str(c).split(".")
if x>len(a[1]):
    print(0)
else:
    print(a[1][x-1])
Previous Article

Integer - Max Factor Count

Next Article

Print Letuscrack as the Output

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *