WINDOWS
CONSOLA
PRACTICA2-3 CONSOLA
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica_2._3
{
class Program
{
static void Main(string[] args)
{
double costo, costot;
Console.WriteLine("\n\t\t BIENVENIDO A AUTOMANIA");
Console.WriteLine("\n\t\tINTRODUCE EL COSTO DEL AUTOMOVIL");
costo = double.Parse(Console.ReadLine());
costot = costo + costo * .12 + costo * .06;
Console.WriteLine("\n\t\t EL COSTO TOTAL DEL AUTO ES {0}", costot);
Console.ReadKey();
}
}
}
PRACTICA2-3 WINDOWS
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_3WINDOWS
{
public partial class Form1 : Form
{
double COSTO, COSTOTOTAL;
public Form1()
{
COSTO =COSTOTOTAL ;
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
COSTO = double.Parse(textBox1.Text);
COSTOTOTAL = COSTO + COSTO * .12 + COSTO * .06;
textBox2.Text = COSTOTOTAL.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
}
}
No hay comentarios:
Publicar un comentario