Diseñar un algoritmo que permita mostrar los cincos primeros números impares que son múltiplos de tres.
Codigo Fuente en Visual Basic
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cad As String = "" For i As Integer = 1 To 30 If (i Mod 2 <> 0 And i Mod 3 = 0) Then cad = cad + " " + Trim(i) End If Next i TextBox1.Text = cad End Sub End Class
0 comentarios:
Publicar un comentario