Code logic is correct but not giving desired output its for factorial number

!

Hey Rishab, can you copy your code on ide, save it and share that link here.

instead of f=f * a and a=a+1, it should be a=a * i; and loop condition should be i<=f

https://ide.codingblocks.com/s/52032

Hey, i guess you have shared the wrong link, it doesn’t have the factorial code in it.