miércoles, 23 de septiembre de 2009

Practica 3.4 Consola.

Codigo de Programa.
Programa Ejecutado.


Practica 3.4 Windows

Codigo de Programa.
Programa Ejecutado.


Practica 3.3 Consola.

Codigo de Programa 3.3

Programa Ejecutado.


Practica 3.3 Windows

Codigo de Programa 3.3 Windows.
Programa Ejecutado.


Practica 3.2 Consola

Codigo de Programa 3.2


Programa Ejecutado 3.2


Practica 3.2 Windows

Codigo de Programa 3.2 Windows.

Programa 3.2 Windows Ejecutado.



Practica 3.1 Consola

Codigo de Programa.

Programa Ejecutado.



Practica 3.1 Windows

Codigo de Programa


Programa Ejecutado.


jueves, 17 de septiembre de 2009

Practica 5

Consola
using System;
using System.Collections.Generic;
using System.Text;
namespace Practica_5_Consola
{
class Program
{
static void Main(string[] args)
{
double costoAuto, costototal;
Console.WriteLine("Introduce Costo del Aauto");
costoAuto = double.Parse(Console.ReadLine());
double ganancia = costoAuto * 0.12;
double impuesto = costoAuto * 0.06;
costototal = costoAuto + ganancia + impuesto;
Console.WriteLine(" Costo del Aauto . . . = {0}\n Ganancia del Vendedro = {1}\n Impuesto = {2}\n Costo Total = {3}", costoAuto, ganancia, impuesto, costototal);
Console.ReadKey() } }}






Windows.

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;using System.Text;

using System.Windows.Forms;
namespace Practica_5_Windows

{

public partial class Form1 : Form

{

double Costtotal, costo;

public Form1()

{

InitializeComponent();

Costtotal = costo = 0;

}
private void CALCULAR_Click(object sender, EventArgs e)

{

costo = double.Parse(textBox1.Text);

Costtotal = costo + costo * 0.12 + costo * 0.06;

textBox2.Text = Costtotal.ToString();

private void CLEAR_Click(object sender, EventArgs e)

{


}

textBox1.Clear();

textBox2.Clear();

textBox1.Focus(); }
private void CLOSE_Click(object sender, EventArgs e)

{

Close(); } }}

Practica 4

Consola



using System;
using System.Collections.Generic;using System.Text;
namespace Practica_4_Consola
{
class Program
{
static void Main(string[] args)
{
int Dist, Vel, Tiem;
Console.WriteLine("Programa que calcula la distancia en millas");
Console.WriteLine("Realizado por Ing. Ruiz Morales S.");
Console.WriteLine("Introduce valor entero que represente la Velocidad de viaje");
Vel = int.Parse(Console.ReadLine());
Console.WriteLine("Introduce valor entero que represente el tiempo transcurrido");
Tiem = int.Parse(Console.ReadLine());
Dist = Vel * Tiem;
Console.WriteLine("La distancia total es {0} millas", Dist);
Console.ReadKey(); } }}











Windows.


using System;

using System.Collections.Generic;using System.ComponentModel;

using System.Data;using System.Drawing;

using System.Text;

using System.Windows.Forms;
namespace Practica_4_Windows

{

public partial class Form1 : Form

{

int Dist, Vel, Tiem;

public Form1()

{

InitializeComponent();

Dist = Vel = Tiem = 0;

}
private void Form1_Load(object sender, EventArgs e)

{
}
private void CALCULAR_Click(object sender, EventArgs e)

{

Vel = int.Parse(textBox1.Text);

Tiem = int.Parse(textBox2.Text);

Dist = Vel * Tiem;

textBox3.Text = Dist.ToString();

}
private void CLEAR_Click(object sender, EventArgs e)

{

textBox1.Clear();

textBox2.Clear();

textBox3.Clear();

textBox1.Focus();
}
private void SALIR_Click(object sender, EventArgs e)

{

Close(); } }}