Option Explicit

Option Explicit
Dim X, S, L As Double
Dim i, j, N, K As Integer
Sub sdgs()
Cells(1, 1) = "Podaj N"
Cells(2, 1) = "Podaj X"
Cells(3, 1) = "Wynik:"
   N = Cells(1, 2).Value
   X = Cells(2, 2).Value
   S = 0
For i = 1 To N - 1 Step 1
   K = 1
For j = 1 To i Step 1
   K = K * j
Next j
   L = 6# ^ X
   S = S + ((X ^ i) * (Log(6#) ^ i)) / K
Next i
If N = 1 Then Cells(3, 2) = 1
If N > 1 Then Cells(3, 2) = S + 1
End Sub

MOJE

Option Explicit

Dim X, S, w, a As Double

Dim i, j, N, K As Integer

Sub kp()

Cells(1, 1) = "wartość n"

Cells(2, 1) = "wartość x"

Cells(3, 1) = "wynik:"

N = Cells(1, 2).Value

X = Cells(2, 2).Value

S = 0

N = 1

a = 1

For i = 1 To N + 1 Step 1

K = 1

For j = 1 To i Step 1

K = K * j

Next j

w = 2# ^ X

S = a + ((X ^ i) * (Log(2#)) ^ i) / K

Next i

If N = 1 Then Cells(3, 2) = 1

If N < 100 Then Cells(3, 2) = S + 100

End Sub


Wyszukiwarka

Podobne podstrony:
Option Explicit22222
BESM d20 Optional Rules
Call option
Pirates Optional Rules
Gaelic option plan
nie mogę znaleźć Blending Options
Program Options, Kody
Zen & the Art of Mayhem Optional Rules
An Overreaction Implementation of the Coherent Market Hypothesis and Options Pricing
Optional Protocol to the International Covenant on Economic, Social and Cultural Rights
Explicit representation for spin 1 matrices
Explication Messe
Insider Strategies For Profiting With Options
Tool Option for 2009 models [LH, LU, LF, PQ, PS]
Options in Fiber
Battlestar Galactica board game optional rules
OPTION G 3dp
JSEC lab2 Firewall User Authorization & Screen Options

więcej podobnych podstron