+ 1

I want to Wright an algorithme witch calculate the factorial of a number and tell us how many zoro there IS on the result

I wrote this but it dont work IS it a right method ? If yes Can you correct it plz #factorial x=abs(int(input('wright a number'))) n=x-1 rest=x//10 i=0 while n!=0: x=x*n; n=n-1 print(x) while type(rest)==int: rest=rest//10 i=i+1 print('the number of zero is:',i)

31st Jul 2019, 5:57 PM
iren yeger
iren yeger - avatar
1 Resposta
0
The code below finds the factorial value of any num and finds number of zeros present in the result. :) https://code.sololearn.com/ctq2en59hFPC/?ref=app
31st Jul 2019, 6:19 PM
Muhammad Shehzad
Muhammad Shehzad - avatar