jueves, 26 de febrero de 2009

Hoja 3 Problema2 (consola)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int p1, p2, p3, p4, p5, opcion;
char sigue;
double total = 0.0;


Console.Clear();
total = 0.0;
Console.WriteLine("\n\t\tproductos");
Console.WriteLine("\n\t\t 1) producto 1 $29.80................ ");
Console.WriteLine("\n\t\t 2) producto 2 $45.00................. ");
Console.WriteLine("\n\t\t 3) producto 3 $99.80................. ");
Console.WriteLine("\n\t\t 4) producto 4 $44.90................. ");
Console.WriteLine("\n\t\t 5) producto 5 $68.75................. ");

Console.Write("\n\t\tSelecciona opcion : ");
do
{
Console.SetCursorPosition(35, 17);
opcion = int.Parse(Console.ReadLine());
switch (opcion)
{
case 1: Console.SetCursorPosition(55, 3);
p1 = int.Parse(Console.ReadLine());
total = total + p1 * 29.80;
break;
case 2: Console.SetCursorPosition(55, 5);
p2 = int.Parse(Console.ReadLine());
total = total + p2 * 45.00;
break;
case 3: Console.SetCursorPosition(55, 7);
p3 = int.Parse(Console.ReadLine());
total = total + p3 * 99.80;
break;
case 4: Console.SetCursorPosition(55, 9);
p4 = int.Parse(Console.ReadLine());
total = total + p4 * 44.90;
break;
case 5: Console.SetCursorPosition(55, 11);
p5 = int.Parse(Console.ReadLine());
total = total + p5 * 68.75;
break;

default:
Console.SetCursorPosition(55, 17);
Console.WriteLine("Presiono opcion equivocada ");
break;
}
Console.SetCursorPosition(20, 20);
Console.Write("Desea otro producto s/n : ");
sigue = char.Parse(Console.ReadLine());
}
while (sigue == 's' sigue == 'S');
Console.SetCursorPosition(20, 22);
Console.WriteLine("El total es {0}", total);
Console.ReadKey();
}
}
}

Hoja 3: Problema1 (consola)


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double cuadrado,lado,areacuadrado,perimetrocuadrado;
double rectangulo, lado1, lado2, arearectangulo, perimetrorectangulo;
double triangulo, lado11, lado12, lado13, areatriangulo, perimetrotriangulo, semiperimetro;
double circulo, radio, areacirculo, perimetrocirculo;
char seguir;
do
{
Console.Clear();
Console.WriteLine("de que figura quiere el area y perimetro");
Console.WriteLine("(1)cuadrado");
Console.WriteLine("(2)rectangulo");
Console.WriteLine("(3)triangulo");
Console.WriteLine("(4)circulo");


int opcion = int.Parse(Console.ReadLine());
switch (opcion)
{
case 1: Console.WriteLine("cudarado");
Console.WriteLine("introduce el valor del lado");
lado = double.Parse(Console.ReadLine());
areacuadrado = lado * lado;
perimetrocuadrado = lado * 4;
Console.WriteLine("area" + areacuadrado);
Console.WriteLine("perimetro" + perimetrocuadrado);
break;
case 2: Console.WriteLine("rectangulo");
Console.WriteLine("introduce el valor del largo");
lado1 = double.Parse(Console.ReadLine());
Console.WriteLine("introduce el valor del ancho");
lado2 = double.Parse(Console.ReadLine());
arearectangulo = lado1 * lado2;
perimetrorectangulo = (lado1 * 2) + (lado2 * 2);
Console.WriteLine("area" + arearectangulo);
Console.WriteLine("perimetro" + perimetrorectangulo);
break;
case 3: Console.WriteLine("triangulo");
Console.WriteLine("introduce el valor del lado1");
lado11 = double.Parse(Console.ReadLine());
Console.WriteLine("introduce el valor del lado2");
lado12 = double.Parse(Console.ReadLine());
Console.WriteLine("introduce el valor del lado3");
lado13 = double.Parse(Console.ReadLine());
perimetrotriangulo = (lado11 + lado12 + lado13);
semiperimetro = (perimetrotriangulo / 2);
areatriangulo = (Math.Sqrt((semiperimetro) * (semiperimetro - lado11) * (semiperimetro - lado12) * (semiperimetro - lado13)));
Console.WriteLine("area" + areatriangulo);
Console.WriteLine("perimetro" + perimetrotriangulo);
break;
case 4: Console.WriteLine("circulo");
Console.WriteLine("introduce el valor del radio");
radio = double.Parse(Console.ReadLine());
areacirculo = (Math.PI) * (Math.Pow(radio,2));
perimetrocirculo = 2 * (Math.PI) * (radio);
Console.WriteLine("area" + areacirculo);
Console.WriteLine("perimetro" + perimetrocirculo);
break;

default:
Console.WriteLine("no es opcion valida");
break;






}
Console.WriteLine("desea hacer otro calculo s/n:");
seguir = char.Parse(Console.ReadLine());
}
while (seguir == 's' seguir == 'S');
Console.ReadKey();


}
}
}

jueves, 19 de febrero de 2009

PROYECTO INTEGRANTES: RIVERA HOYOS AJELET / RAMIREZ ARZATE FORTUNATO























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 Tutorial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button3_Click_1(object sender, EventArgs e)
{
checkBox1.Checked = false;
checkBox2.Checked = false;
checkBox3.Checked = false;
checkBox4.Checked = false;
checkBox5.Checked = false;
checkBox6.Checked = false;
checkBox7.Checked = false;
checkBox8.Checked = false;
checkBox10.Checked = false;
checkBox11.Checked = false;
checkBox12.Checked = false;
checkBox13.Checked = false;
}
private void button6_Click(object sender, EventArgs e)
{
if (checkBox3.Checked && checkBox1.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
{
if (checkBox4.Checked && checkBox2.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else

if (checkBox4.Checked && checkBox1.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox3.Checked && checkBox2.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else
if (checkBox4.Checked != checkBox3.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox4.Checked == checkBox1.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else

if (checkBox3.Checked == checkBox2.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox4.Checked && checkBox3.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
{
MessageBox.Show("CORRECTO");
}

}
}
private void button5_Click(object sender, EventArgs e)
{
if (checkBox12.Checked && checkBox11.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
{
if (checkBox13.Checked && checkBox10.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else

if (checkBox13.Checked && checkBox11.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else

if (checkBox12.Checked && checkBox10.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else
if (checkBox13.Checked != checkBox12.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox13.Checked == checkBox11.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else

if (checkBox12.Checked == checkBox10.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else
if (checkBox13.Checked && checkBox12.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
{
MessageBox.Show("CORRECTO");
}


}
}
private void button4_Click(object sender, EventArgs e)
{
if (checkBox8.Checked && checkBox6.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
{
if (checkBox7.Checked && checkBox5.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else

if (checkBox7.Checked && checkBox6.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox8.Checked && checkBox5.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}

else
if (checkBox7.Checked != checkBox8.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox7.Checked == checkBox6.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else

if (checkBox8.Checked == checkBox5.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
if (checkBox7.Checked && checkBox8.Checked)
{
MessageBox.Show("INTENTALO DE NUEVO");
}
else
{
MessageBox.Show("CORRECTO");
}

}
}
private void salirToolStripMenuItem_Click(object sender, EventArgs e)
{
Close( );

}
private void tabPage4_Click(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void pictureBox4_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
double v, rt, vt, it, r1, r2, r3, r4;
if (textBox1.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}

else
{
if (textBox2.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}
else


if (textBox3.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}
else


if (textBox4.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}
else


if (textBox5.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}


else
{
v = double.Parse(textBox1.Text);
r1 = double.Parse(textBox2.Text);
r2 = double.Parse(textBox3.Text);
r3 = double.Parse(textBox4.Text);
r4 = double.Parse(textBox5.Text);
rt = ((1 / ((1 / r2) + (1 / r3) + (1 / r4))) + (r1));
it = (v / rt);
vt = (it * rt);
listBox1.Items.Add("RESISTENCIA TOTAL= " + rt);
listBox1.Items.Add("OHMS");
listBox1.Items.Add("CORRIENTE TOTAL= " + it);
listBox1.Items.Add("AMPERES");
listBox1.Items.Add("VOLTAJE TOTAL= " + vt);
listBox1.Items.Add("VOLTS");



}
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void pictureBox20_Click(object sender, EventArgs e)
{
}
private void button13_Click(object sender, EventArgs e)
{



double resultado, banda1, banda2, banda3, banda4, bandaa1, bandaa3;
if (textBox11.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}

else
{
if (textBox12.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}
else


if (textBox13.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}
else
// AUTORES: AJELET RIVERA * FORTUNATO RAMIREZ //

if (textBox14.Text == "")
{
MessageBox.Show("INTRODUCE TODOS LOS DATOS PORFAVOR");
}
else
{

banda1 = double.Parse(textBox11.Text);
banda2 = double.Parse(textBox12.Text);
banda3 = double.Parse(textBox13.Text);
banda4 = double.Parse(textBox14.Text);
bandaa3 = (Math.Pow(10, banda3));
resultado = (banda2 * bandaa3);


textBox15.Text = banda1.ToString();
textBox16.Text = banda2.ToString();
if (banda3 == 0)
{
textBox17.Text = (" ");
}
else if (banda3 == 1)
{
textBox17.Text = ("0");
}
else if (banda3 == 2)
{
textBox17.Text = ("00");
}
else if (banda3 == 3)
{
textBox17.Text = ("K");
}
else if (banda3 == 4)
{
textBox17.Text = ("0000");
}
else if (banda3 == 5)
{
textBox17.Text = ("00000");
}
else if (banda3 == 6)
{
textBox17.Text = ("M");
}
else if (banda3 == 7)
{
textBox17.Text = ("0000000");
}
else if (banda3 == 8)
{
textBox17.Text = ("00000000");
}
else if (banda3 == 9)
{
textBox17.Text = ("G");
}
if (banda4 == 10)
{
textBox18.Text = ("tolerancia" + "," + "+/-5%");
}
else if (banda4 == 11)
{
textBox18.Text = ("tolerancia" + "," + "+/-10%");
}
else if (banda4 == 12)
{
textBox18.Text = ("tolerancia" + "," + "+/-20%");
}


if (banda1 > 9)
{
MessageBox.Show("INTRODUCE SOLO LOS VALORES QUE ESTAN EN LA TABLA");
textBox11.Clear();
textBox12.Clear();
textBox13.Clear();
textBox14.Clear();
textBox15.Clear();
textBox16.Clear();
textBox17.Clear();
textBox18.Clear();
textBox11.Focus();
}
if (banda2 > 9)
{
MessageBox.Show("INTRODUCE SOLO LOS VALORES QUE ESTAN EN LA TABLA");
textBox11.Clear();
textBox12.Clear();
textBox13.Clear();
textBox14.Clear();
textBox15.Clear();
textBox16.Clear();
textBox17.Clear();
textBox18.Clear();
textBox11.Focus();
}
if (banda3 > 9)
{
MessageBox.Show("INTRODUCE SOLO LOS VALORES QUE ESTAN EN LA TABLA");
textBox11.Clear();
textBox12.Clear();
textBox13.Clear();
textBox14.Clear();
textBox15.Clear();
textBox16.Clear();
textBox17.Clear();
textBox18.Clear();
textBox11.Focus();
}
if (banda4 < 10)
{
MessageBox.Show("INTRODUCE SOLO LOS VALORES QUE ESTAN EN LA TABLA");
textBox11.Clear();
textBox12.Clear();
textBox13.Clear();
textBox14.Clear();
textBox15.Clear();
textBox16.Clear();
textBox17.Clear();
textBox18.Clear();
textBox11.Focus();
}
if (banda4 > 12)
{
MessageBox.Show("INTRODUCE SOLO LOS VALORES QUE ESTAN EN LA TABLA");
textBox11.Clear();
textBox12.Clear();
textBox13.Clear();
textBox14.Clear();
textBox15.Clear();
textBox16.Clear();
textBox17.Clear();
textBox18.Clear();
textBox11.Focus();
}

}
}
}
private void textBox18_TextChanged(object sender, EventArgs e)
{
}
private void button14_Click(object sender, EventArgs e)
{
textBox11.Clear();
textBox12.Clear();
textBox13.Clear();
textBox14.Clear();
textBox15.Clear();
textBox16.Clear();
textBox17.Clear();
textBox18.Clear();
textBox11.Focus();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
listBox1.Items.Clear();
textBox1.Focus();
}
private void tabPage11_Click(object sender, EventArgs e)
{
}
private void tabPage13_Click(object sender, EventArgs e)
{
}
private void button15_Click(object sender, EventArgs e)
{




if (radioButton8.Checked)
{
textBox19.Text = ("cero TE RECOMENDAMOS REPETIR TUTORIAL");
}
if (radioButton6.Checked)
{
textBox19.Text = ("cero TE RECOMENDAMOS REPETIR TUTORIAL");
}
if (radioButton3.Checked)
{
textBox19.Text = ("cero TE RECOMENDAMOS REPETIR TUTORIAL");
}
if(radioButton1.Checked)
{
textBox19.Text = ("cero TE RECOMENDAMOS REPETIR TUTORIAL");
}
if (radioButton1.Checked && radioButton3.Checked && radioButton6.Checked && radioButton8.Checked)
{
textBox19.Text = ("cero TE RECOMENDAMOS REPETIR TUTORIAL");
}
if (radioButton2.Checked radioButton4.Checked radioButton5.Checked radioButton7.Checked)
{
textBox19.Text = ("2.5");
}
if (radioButton2.Checked && radioButton4.Checked)
{
textBox19.Text = ("5");
}
if (radioButton2.Checked && radioButton5.Checked)
{
textBox19.Text = ("5");
}
if (radioButton2.Checked && radioButton7.Checked)
{
textBox19.Text = ("5");
}
if (radioButton4.Checked && radioButton5.Checked)
{
textBox19.Text = ("5");
}
if (radioButton4.Checked && radioButton7.Checked)
{
textBox19.Text = ("5");
}
if (radioButton5.Checked && radioButton7.Checked)
{
textBox19.Text = ("5");
}

if (radioButton2.Checked && radioButton4.Checked && radioButton5.Checked)
{
textBox19.Text = ("7.5");
}
if (radioButton2.Checked && radioButton4.Checked && radioButton7.Checked)
{
textBox19.Text = ("7.5");
}

if (radioButton4.Checked && radioButton5.Checked && radioButton7.Checked)
{
textBox19.Text = ("7.5");
}


if (radioButton5.Checked && radioButton7.Checked && radioButton2.Checked)
{
textBox19.Text = ("7.5 ");
}
if (radioButton2.Checked && radioButton4.Checked && radioButton5.Checked && radioButton7.Checked)
{
textBox19.Text = ("10 FELICIDADES ASIMILASTE BIEN EL TUTORIAL");
}
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
}
private void informacionToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("AUTORES: RIVERA, RAMIREZ, VERSION: 1.0");
}
private void button16_Click(object sender, EventArgs e)
{
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
radioButton6.Checked = false;
radioButton7.Checked = false;
radioButton8.Checked = false;
textBox19.Clear();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
























































jueves, 12 de febrero de 2009

PRACTICA 2 EN VISUAL (HOJA 2)








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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btcalcular_Click(object sender, EventArgs e)
{
double largo, ancho, precioxm2, area,precio;
largo = double.Parse(txtlargo.Text);
ancho = double.Parse(txtancho.Text);
precioxm2=double.Parse(txtprecioxm2.Text);
area=largo*ancho;
precio = area*precioxm2;
if (area<=500) {txtprecio.Text=precio.ToString(); txtdescuento.Text = ("0%"); } else if (area > 500 && area <= 1000) { precio = precio-(precio * .15); txtprecio.Text = precio.ToString(); txtdescuento.Text = ("15%"); } else if (area > 1000)
{
precio = precio-(precio * .25);
txtprecio.Text = precio.ToString();
txtdescuento.Text=("25%");
}
}
private void txtprecioxm2_TextChanged(object sender, EventArgs e)
{
}
private void btlimpiar_Click(object sender, EventArgs e)
{
txtlargo.Clear();
txtancho.Clear();
txtprecioxm2.Clear();
txtdescuento.Clear();
txtprecio.Clear();
txtlargo.Focus();
}
private void btsalir_Click(object sender, EventArgs e)
{
Close();
}
}
}

PRACTICA 1 EN VISUAL ( HOJA 2 )


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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
}
private void btsalir_Click(object sender, EventArgs e)
{
}
private void txtcalificacion1_TextChanged(object sender, EventArgs e)
{
}
private void txtcalificacion3_TextChanged(object sender, EventArgs e)
{
}
private void btcalcular_Click(object sender, EventArgs e)
{
double calificacion1, calificacion2, calificacion3, calificacion4, promedio;
string nombre;
nombre = (txtnombre.Text);
calificacion1 = double.Parse(txtcalificacion1.Text);
calificacion2 = double.Parse(txtcalificacion2.Text);
calificacion3 = double.Parse(txtcalificacion3.Text);
calificacion4 = double.Parse(txtcalificacion4.Text);
//08211334*RAMIREZ ARZATE FORTUNATO*//
promedio = (calificacion1 + calificacion2 + calificacion3 + calificacion4) / 4;
txtnombree.Text = (txtnombre.Text);
txtpromedio.Text=promedio.ToString();

if (promedio > 70)
{
txtaprovadoreprovado.Text = ("aprovado");
}
else
{
txtaprovadoreprovado.Text = ("reprovado");
}
}
private void textBox7_TextChanged(object sender, EventArgs e)
{
}
private void btlimpiar_Click(object sender, EventArgs e)
{
txtnombre.Clear();
txtcalificacion1.Clear();
txtcalificacion2.Clear();
txtcalificacion3.Clear();
txtcalificacion4.Clear();
txtnombree.Clear();
txtpromedio.Clear();
txtaprovadoreprovado.Clear();
txtnombre.Focus();
}
private void btsalir_Click_1(object sender, EventArgs e)
{
Close();
}
}
}

miércoles, 11 de febrero de 2009

Programa 2 en consola (hoja 2 )



















using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double largo, ancho, preciom2, costo_total, area;
Console.WriteLine("introduce el largo");
largo = double.Parse(Console.ReadLine());
Console.WriteLine("introduce el ancho");
ancho = double.Parse(Console.ReadLine());
Console.WriteLine("introducel el precio por metro cuadrado");
preciom2 = double.Parse(Console.ReadLine());
area=largo*ancho;
costo_total = (area * preciom2);
Console.WriteLine("largo=" + largo+ ","+ "ancho=" + ancho+ ","+"precio m2=" + preciom2);
//08211334//RAMIREZ ARZATE FORTUNATO//
if (area <>
{
Console.WriteLine("sin descuento costo total=" + costo_total);
}
else if (area > 500 && area <>
{
costo_total = costo_total - (costo_total * 0.15); Console.WriteLine("mayor que 500, - 15% costo total=" + costo_total);
}
else if (area > 1000)
{
costo_total = costo_total - (costo_total * 0.25);
Console.WriteLine("mayor que 1000,- 25% costo total=" + costo_total);
}
Console.ReadLine();




}
}
}

Practica 1 en consola (hoja 2)




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
double calificacion1, calificacion2, calificacion3, calificacion4, promedio;
string nombre;
Console.WriteLine("introduce tu nombre:");
nombre = Console.ReadLine();
Console.WriteLine("introduce calificacion1");
calificacion1 = double.Parse(Console.ReadLine());
Console.WriteLine("introduce calificacion2");
calificacion2=double.Parse(Console.ReadLine());
Console.WriteLine("introduce calificacion3");
calificacion3 = double.Parse(Console.ReadLine());
Console.WriteLine("introduce calificacion4");
calificacion4 = double.Parse(Console.ReadLine());
promedio = (calificacion1 + calificacion2 + calificacion3 + calificacion4) / 4;
//08211334*RAMIREZ ARZATE FORTUNATO*//
Console.WriteLine("nombre=" + nombre);
Console.WriteLine("calificacion1=" + calificacion1);
Console.WriteLine("calificacion2=" + calificacion2);
Console.WriteLine("calificacion3=" + calificacion3);
Console.WriteLine("calificacion4=" + calificacion4);
Console.WriteLine("promedio=" + promedio);
if (promedio > 70)
{
Console.Write("aprovado");
}
else
{
Console.WriteLine("reprovado");
}
Console.ReadLine();
}
}
}

martes, 10 de febrero de 2009

Programa 3 en windows ( convertidor grados )

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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double farenheit, celsius;
farenheit = double.Parse(textBox1.Text);
celsius = 5.0 / 9.0 * (farenheit - 32);
textBox2.Text = celsius.ToString();
//08211334*RAMIREZ ARZATE FORTUNATO*//
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
textBox1.Focus();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
}

Progrma 2 en windows (convertidor horas)

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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
int horas, minutos, segundos, dias;
public Form1()
{
InitializeComponent();
horas = minutos = segundos = dias = 0;
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void txtconvertir_Click(object sender, EventArgs e)
{
horas = int.Parse(txthoras.Text);
minutos = horas * 60;
segundos = horas * 3600;
dias = horas / 24;
Desplegar.Items.Add("valor en horas" + horas);
Desplegar.Items.Add("suequivalencia es");
Desplegar.Items.Add("minutos" + minutos);
Desplegar.Items.Add("segundos" + segundos);
Desplegar.Items.Add("dias" + dias);
//o8211334*RAMIREZ ARZATE FORTUNATO*//
}
private void txtlimpiar_Click(object sender, EventArgs e)
{
txthoras.Clear();
Desplegar.Items.Clear();
txthoras.Focus();

}
private void txtsalir_Click(object sender, EventArgs e)
{
Close();
}
private void txthoras_TextChanged(object sender, EventArgs e)
{
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}

Programa 1 en windows (cuantificador de terreno)


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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label2_Click(object sender, EventArgs e)
{
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
}
private void calcula_Click(object sender, EventArgs e)
{
double ancho, longitud, costom2;
double costototal;
ancho=double.Parse(txtanchura.Text);
longitud=double.Parse(txtlongitud.Text);
costom2=double.Parse(txtcostom2.Text);
costototal=ancho*longitud*costom2;
txtcostototal.Text=costototal.ToString();
//08211334*RAMIREZ ARZATE FORTUNATO*//
}
private void limpia_Click(object sender, EventArgs e)
{
txtanchura.Clear();
txtlongitud.Clear();
txtcostom2.Clear();
txtcostototal.Clear();
txtanchura.Focus();
}
private void salir_Click(object sender, EventArgs e)
{
Close();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void txtlongitud_TextChanged(object sender, EventArgs e)
{
}
}
}