# 3-masala. Factorial
"""def fact(n):
    print(n)
    if n== 1:
        return 1
    else:
        return n+fact(n-1)

print(fact(6))
"""
""" 
Masala 1 dan n gacha bo'lgan yig'indisi hisoblash dasturi.
def yigindi(n):
    if n==1:
        return 1
    else:
        return n+yigindi(n-1)

print(yigindi(7))
"""
"""
#Masala 1 dan n gacha bo`lgan yig'indisi teskari tartibda chiqarish dasturi.
def teskari(n):
    if n==1:
        print(n)
    else:
        print(n)
        teskari(n-1)

teskari(5)
"""




