segunda-feira, 8 de novembro de 2010

ficha de trabalho numero 9 exercicio 2

Private Sub Command1_Click()
Dim num1 As Integer, num2 As Integer, cont As Integer, div As Integer
Do
div = 0
cont = 1
Do Until cont > num1
If num1 Mod cont = 0 Then
div = div + 1
End If
cont = cont + 1
Loop
If div = 2 Then
Picture1.Print num1
End If
num1 = num1 + 1
Loop Until num1 > 100
End Sub

Private Sub Command2_Click()
If MsgBox("Quer mesmo sair?", vbOKCancel + vbQuestion, "confirmação") = vbOK Then
End
End If
End Sub


Sem comentários:

Enviar um comentário