Showing posts with label While. Show all posts
Showing posts with label While. Show all posts

Factorial using while loop

f=i=1
n=int(raw_input('Enter the number: '))
while i<=n:
      f=f*i
      i=i+1
print f