Computer Science, asked by gokulgopi645, 1 month ago

Could You Please find why ,it's giving wrong result ⬇️
n=4

i=1

while(i<n):

f=n*i

if i==n-1:

break

else:

i=i+1

print("factorial=",f)
I want output : 24


gokulgopi645: Please ans
kritika5216: Sorry i Don't know

Answers

Answered by kritika5216
0

Answer:

Ok then write the question properly


gokulgopi645: to find factotial of any number {using while loop }
Answered by atrs7391
0

Answer:

n=4

i=1

f=0

while (i<n):

   j = i*n

   f = j+f

   i = i+1

print ("Factorial of the Number is:",f)

Explanation:

Your looping was not right.

Similar questions