Python Program to Calculate Factorial of Given Number Using While Loop
print("Python program to calculate Factorial of Given Number")
n=int(input("Enter Number to calculate Factorial:"))
fact=1
i=1
while i<=n:
fact=fact*i
i=i+1
print(f"Factorial of {n} is: {fact}")
print("End of Program")
Output:
Python program to calculate Factorial of Given Number
Enter Number to calculate Factorial:5
Factorial of 5 is: 120
End of Program
0 टिप्पण्या
कृपया तुमच्या प्रियजनांना लेख शेअर करा आणि तुमचा अभिप्राय जरूर नोंदवा. 🙏 🙏