pastebin

Paste Search Dynamic
Recent pastes
vvod mas
  1. import math
  2. n=14
  3. a=[]
  4. def vvod_mas(a,n):
  5.     for i in range(n):
  6.         a1=math.cos(1/(i+1))+1
  7.         a.append(a1)
  8. def da(a,n):
  9.     S=int(0)
  10.     for i in range(1,n,2):
  11.         S+=math.fabs(a[i])
  12.     S2=int(1)
  13.     for i in range(2,n,2):
  14.         S2*=a[i]
  15.     return S,S2
  16. print("Massive B")
  17. b=[]
  18. vvod_mas(b,n)
  19. print(b)
  20. S,S2=da(b,n)
  21. print("S= ",S)
  22. print("Dobutok= ",S2)
  23. G=S/S2
  24. print("S/Dobutok= ",G)
  25.  
Parsed in 0.015 seconds