Programacion En C#

Páginas: 3 (691 palabras) Publicado: 23 de mayo de 2012
Programa que a un precio le calcula el descuento
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;usingSystem.Text;using System.Windows.Forms;namespace cantidad_comprada{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private voidForm1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { double des = .35, tot = 0, compra = 0, cal =0; compra = Convert.ToDouble(textBox1.Text); tot = compra * des; cal = compra - des; textBox2.Text = des.ToString(); textBox3.Text =cal.ToString(); } }} |

Programa numero secreto
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;usingSystem.Text;using System.Windows.Forms;namespace numero_secreto{ public partial class Form1 : Form { int alea = 0; public Form1() { InitializeComponent(); }private void label1_Click(object sender, EventArgs e) { } private void label1_Click_1(object sender, EventArgs e) { } private void button2_Click(object sender,EventArgs e) { int num = 0; label1.Text = alea.ToString(); label1.Visible = true; textBox1.Enabled = false; button2.Enabled = false;num = Convert.ToInt16(textBox1.Text); if (num == alea) { label3.Text = "GANASTE =D"; } else {label3.Text="PERDEDOR"; } label3.Visible=true; button3.Enabled=true; } private void button1_Click(object sender, EventArgs e) { Random x = new...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • programacion C
  • Programacion c++
  • c# Programacion
  • Programacion en c
  • Programacion en c
  • Programacion en c++
  • Programacion c ++
  • Programación En C++

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS