Programacion c sharp
ZX GAMES 666Ensayo21 de Noviembre de 2018
858 Palabras (4 Páginas)132 Visitas
[pic 1]
[pic 2]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualBasic;
namespace Ejercicio06
{
public partial class Form1 : Form
{
int i = 0;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btn_iniciar_Click(object sender, EventArgs e)
{
}
private void label2_Click(object sender, EventArgs e)
{
}
private void btn_ingresar_Click(object sender, EventArgs e)
{
i++;
int numero;
bool bandera = true;
if (txt_numero.Text!=" ")
{
bandera = int.TryParse(txt_numero.Text, out numero);
if (bandera)
{
if (numero % 5 == 0 && numero % 3 == 0)
{
cmb_35.Items.Add(numero);
txt_numero.Clear();
}
if (numero % 3 == 0)
{
cmb_3.Items.Add(numero);
txt_numero.Clear();
}
if (numero % 5 == 0) {
cmb_5.Items.Add(numero);
txt_numero.Clear();
}
}
else
...