Codigo para programa de juego adivina tres numeros

Páginas: 2 (256 palabras) Publicado: 10 de abril de 2010
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;namespace adivinatresveces
{
public partial class Form1 : Form
{



public Form1()
{
InitializeComponent();Random num = new Random();
int guessa = num.Next(1, 25);
valora = guessa ;
int guessb = num.Next(1, 25);
valorb = guessb;
intguessc = num.Next(1, 25);
valorc = guessc;
this.label4.Text = guessa.ToString();
this.label5.Text = guessb.ToString();
this.label6.Text =guessc.ToString();
this.textBox1.KeyPress += new
System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);


}

int valora, valorb, valorc,c;private void verificarguess(int n)
{

if ((valora == n) || (valorb == n) || (valorc == n))
if (valora == n){
label1.Text = this.valora.ToString();
c++;
this.numericUpDown1.Value++;
}
else if (valorb ==n)
{
label2.Text = this.valorb.ToString();
c++;
this.numericUpDown1.Value++;
}else if (valorc == n)
{
label3.Text = this.valorc.ToString();
c++;
this.numericUpDown1.Value++;}
else
numericUpDown1.Value = (numericUpDown1.Value + 1);

else
numericUpDown1.Value = (numericUpDown1.Value + 1);...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Codigos para juegos pokemon
  • codigo MIPS para ordenar numeros
  • Codigo Para Ordenar Cuatro Numeros
  • Código De Programa Para Sumar Dbs
  • programa para imprimir código asscci
  • Codigo para programadores princippiantes (en C#)
  • Adivine El Numero
  • Adivinanzas Numericas

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS