Sei sulla pagina 1di 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;

namespace automatas1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
string[] mn = { "A", "I", "E", "O","U" };
string[] vm = { "a", "e", "i", "o", "u" };
string[] consonante1 = { "Q", "W", "R", "T",
"Y","P","S","D","F","G","H","J","K","L","�", "Z","X","C","V","B","N","M"};
string[] consonante2 = { "q", "w", "r", "t", "y","p", "s", "d", "f",
"g", "h", "j", "k", "l", "�", "z", "x", "c", "v", "b", "n", "m" };
string[] operadores = {"+","*","-","/" };
string V=textBox1.Text;

if (mn.Contains(V) == true)
{
MessageBox.Show("SI EXISTE ES UNA VOCAL MAYUSCULA");
}
else {
if (vm.Contains(V) == true)
{
MessageBox.Show("SI EXISTE ES UNA VOCAL MINUSCULA");
}
else
{
if (consonante1.Contains(V) == true)
{
MessageBox.Show("SI EXISTE ES UNA CONSONANTE MAYUSCULA");
}
else
{
if (consonante2.Contains(V) == true)
{
MessageBox.Show("SI EXISTE ES UNA CONSONANTE
MINUSCULA");
}
else
{
// MessageBox.Show("NO EXISTE :(");
if (operadores.Contains(V) == true)
{
MessageBox.Show("SI EXISTE");
if ((operadores.GetValue(0).ToString()) == V)
{
MessageBox.Show(" ES EL SIGNO + SIRVE PARA
SUMAR/CONCATENAR");

}
if ((operadores.GetValue(1).ToString()) == V)
{
MessageBox.Show(" ES EL SIGNO * SIRVE PARA
MULTIPLICAR");

}
if ((operadores.GetValue(2).ToString()) == V)
{
MessageBox.Show(" ES EL SIGNO - SIRVE PARA
RESTAR");

}
if ((operadores.GetValue(3).ToString()) == V)
{
MessageBox.Show(" ES EL SIGNO / SIRVE PARA
DIVIDIR");

}
else
{
MessageBox.Show("NO EXISTE :(");
}
}

}
}

}
}
}
}

Potrebbero piacerti anche