PRACTICA 2 (A.CONSOLA)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiiylOZM4dQmONwKakPmM7IqeIWfgxvBRxOYlMin_sF4pspPbJnYRxHCk-S2pepiZ7d55bFciSUMmXsUa91ty9TZCQecH9yAT7q5IzgbUYW9JcEYT30HatShUCpDP2NIghfYJeWbd5tt8/s320/3.bmp)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKNXS799pgZ60W8DjukNnUiqaaZVIpwMg9ILY8dbJId-lVorGN0eZhD8gmCCYhf_nRzS7OgUTh_uD3vka7QNp3ZgDx9RekKS3KxePErpjBwmBCcxHzB9vnpDKFF3jLW6B9yVSoOkzCPuk/s320/4.bmp)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica_2__a_
{
class Program
{
static void Main(string[] args)
{
int N, M, P, Rs;
Console.WriteLine("introduce la cantidad de la R de 50 ohms");
N=int.Parse (Console.ReadLine() );
Console.WriteLine("introduce la cantidad de la R de 33 ohms");
M=int.Parse (Console.ReadLine() );
Console.WriteLine("introduce la cantidad de la R de 15 ohms");
P=int.Parse (Console.ReadLine() );
Rs=N*50+M*33+P*15;
Console.WriteLine("la R total en serie es {0}",Rs);
Console.ReadKey();
}
}
}
PRACTICA 2 (A. VISUAL)
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 practica_2_a.v_
{
public partial class Form1 : Form
{
int N, M, P, Rs;
public Form1()
{
N = M = P = 0;
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
N = int.Parse(textBox1.Text);
M = int.Parse(textBox2.Text);
P = int.Parse(textBox3.Text);
Rs = N*56+M*33+P*15;
textBox4.Text = ("la R total en en serie es ") + Rs.ToString ();
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
private void button2_Click(object sender, Event Args e)
{
Close();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica2_B.c_
{
class Program
{
static void Main(string[] args)
{
int distancia, velocidad, tiempo;
Console.WriteLine("programa que calcular la distancia en millas");
Console.WriteLine("introduce valores enteros que se representa la velocidad");
velocidad=int.Parse(Console.ReadLine());
Console.WriteLine("introduce valor entero que representa el tiempo trascurrido");
tiempo=int.Parse(Console.ReadLine());
distancia=velocidad*tiempo;
Console.WriteLine("la distancia total en millas {0}", distancia);
Console.ReadKey();
}
}
}
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 practica2_B.v_
{
public partial class Form1 : Form
{
int Distancia, Velocidad, Tiempo;
public Form1()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Velocidad = int.Parse(textBox1.Text);
Tiempo = int.Parse(textBox2.Text);
Distancia = Velocidad * Tiempo;
textBox3.Text = ("la distancia total en millas es ") + Distancia.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int Costo, Ganancia, Impuesto, Ca;
Console.WriteLine("introduce el valor del auto");
Ca = int.Parse(Console.ReadLine());
Impuesto = (Ca * 6) / 100;
Ganancia = (Ca * 12) / 100;
Costo = Ca + Impuesto + Ganancia;
Console.WriteLine("el impuesto es de_ {0}", Impuesto);
Console.WriteLine("la ganancia del vendedor es_ {0}", Ganancia);
Console.WriteLine("el costo final del auto es_ {0}", Costo);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace practica_2_a.v_
{
public partial class Form1 : Form
{
int N, M, P, Rs;
public Form1()
{
N = M = P = 0;
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
N = int.Parse(textBox1.Text);
M = int.Parse(textBox2.Text);
P = int.Parse(textBox3.Text);
Rs = N*56+M*33+P*15;
textBox4.Text = ("la R total en en serie es ") + Rs.ToString ();
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
private void button2_Click(object sender, Event Args e)
{
Close();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica2_B.c_
{
class Program
{
static void Main(string[] args)
{
int distancia, velocidad, tiempo;
Console.WriteLine("programa que calcular la distancia en millas");
Console.WriteLine("introduce valores enteros que se representa la velocidad");
velocidad=int.Parse(Console.ReadLine());
Console.WriteLine("introduce valor entero que representa el tiempo trascurrido");
tiempo=int.Parse(Console.ReadLine());
distancia=velocidad*tiempo;
Console.WriteLine("la distancia total en millas {0}", distancia);
Console.ReadKey();
}
}
}
PRACTICA 2 (B.VISUAL)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi20k1Pg_l8jfd9sIMJM1r7vrLvu6NOvRN4chImpFTrX-vOdinXPtEpIr0SI3tZKy9GM5OeSjuulLmJiuEZuEo0pnXBl4Aye6XBAGLIp7RESLy66nz-lVLMccw6TBGtXaoXrPMsZpiQeLM/s320/7.bmp)
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace practica2_B.v_
{
public partial class Form1 : Form
{
int Distancia, Velocidad, Tiempo;
public Form1()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Velocidad = int.Parse(textBox1.Text);
Tiempo = int.Parse(textBox2.Text);
Distancia = Velocidad * Tiempo;
textBox3.Text = ("la distancia total en millas es ") + Distancia.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
}
}
PRACTICA 2 (C.CONSOLA)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcJxBFY3b9pO8B_egYqe-u1HIe8p3HOWrLtTQEo4hDwauLZOp1WvfIcNb54Spy1H1WM2B-n3vIwtFYrTReDZwoqsgyY0mnly3MRI53nfuuC87Umfj0WMyjfDDTIMPcKKh4wHkH1wD-B-c/s320/8.bmp)
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int Costo, Ganancia, Impuesto, Ca;
Console.WriteLine("introduce el valor del auto");
Ca = int.Parse(Console.ReadLine());
Impuesto = (Ca * 6) / 100;
Ganancia = (Ca * 12) / 100;
Costo = Ca + Impuesto + Ganancia;
Console.WriteLine("el impuesto es de_ {0}", Impuesto);
Console.WriteLine("la ganancia del vendedor es_ {0}", Ganancia);
Console.WriteLine("el costo final del auto es_ {0}", Costo);
Console.ReadKey();
}
}
}
PRACTICA 2 (B.VISUAL)
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 practica__C.v_
{
public partial class Form1 : Form
{
int Ct, G, I, Ca;
public Form1()
{
Ct = G = I = Ca = 0;
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Ca = int.Parse(textBox1.Text);
I = (Ca * 6) / 100;
G = (Ca * 12) / 100;
Ct = I + G + Ca;
textBox4.Text = Ct.ToString();
textBox2.Text = I.ToString();
textBox3.Text = G.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
}
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN2rbhyphenhyphenJcVcPfBrTUJnJTX7t-Y5lflSl3kqbZKklvNzWI8JTp3Kogn3kGfHJa6DRu_qliAQtaimW-P5SAg76ETMqj9i9RyN7KKkTj1gz0MeigxuJYy7rXcn7Xqn4MXeOLab7kVeKNQNew/s320/9.bmp)
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace practica__C.v_
{
public partial class Form1 : Form
{
int Ct, G, I, Ca;
public Form1()
{
Ct = G = I = Ca = 0;
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Ca = int.Parse(textBox1.Text);
I = (Ca * 6) / 100;
G = (Ca * 12) / 100;
Ct = I + G + Ca;
textBox4.Text = Ct.ToString();
textBox2.Text = I.ToString();
textBox3.Text = G.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
}
}
No hay comentarios:
Publicar un comentario