sábado, 24 de octubre de 2009

PRACTICA 5.2 D



namespace practica_5._6_console
{
class Program
{
static void Main(string[] args)
{
int c1, er;
c1 = 0;
er = 0;
do
{
Console.WriteLine(" \n Introduce Calificacion");
c1 = int.Parse(Console.ReadLine());
if (c1 <> 100)
{
er = er + 1;
}
}
while (er < 5);
Console.ReadLine();
}


PRACTICA EN WINDOWS



public partial class Form1 : Form
{
int c1, er;
public Form1()
{
c1 = 0;
er = 0;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
c1 = int.Parse(textBox1.Text);
if (c1 <> 100)
{
listBox1.Items.Add(c1.ToString());
er = er + 1;
}
else
{
listBox1.Items.Add(c1);
}
if (er > 5)
{ Close(); }



No hay comentarios:

Publicar un comentario