Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub silnia()
- Dim n, silnia As Integer
- Dim r As Range
- Set r = Range(2, 1)
- n = Cells(2, 1).Value
- If n > 0 Then
- silnia = n * (n - 1)
- ElseIf n = 0 Then
- silnia = 1
- ElseIf n < 0 Then
- MsgBox ("Podales ujemna liczbe")
- ElseIf IsEmpty(r) Then
- MsgBox ("Nie wprowadziles liczby")
- ElseIf IsNumeric(r) = False Then
- MsgBox ("Wprowadziles litere")
- End If
- MsgBox silnia
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement