I
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica_4._3_consola
{
class Program
{
static void Main(string[] args)
{
double celsius, f;
celsius = -10.0;
f = 00.0;
Console.WriteLine("Celsius \t\t Fahrenheit");
while (celsius <= 60.0) { f = (9.0 / 5.0) * celsius + 32.0; Console.WriteLine(celsius.ToString() + " \t\t " + f.ToString()); celsius = celsius + 10.0; Console.ReadLine(); } } } } 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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
double celsius, f;
public Form1()
{
celsius = -10.0;
f = 0.0;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Add("celsius fahrenheit");
while (celsius<=60.0) { f=(9.0/5.0)*celsius+32.0; listBox1.Items.Add(celsius.ToString ()+ " " + f.ToString()); celsius=celsius + 10.0; } } private void button2_Click(object sender, EventArgs e) { listBox1.Items.Clear(); } private void button3_Click(object sender, EventArgs e) { Close(); } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { } } }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace practica_4._3_consola
{
class Program
{
static void Main(string[] args)
{
double celsius, f;
celsius = -10.0;
f = 00.0;
Console.WriteLine("Celsius \t\t Fahrenheit");
while (celsius <= 60.0) { f = (9.0 / 5.0) * celsius + 32.0; Console.WriteLine(celsius.ToString() + " \t\t " + f.ToString()); celsius = celsius + 10.0; Console.ReadLine(); } } } } 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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
double celsius, f;
public Form1()
{
celsius = -10.0;
f = 0.0;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Add("celsius fahrenheit");
while (celsius<=60.0) { f=(9.0/5.0)*celsius+32.0; listBox1.Items.Add(celsius.ToString ()+ " " + f.ToString()); celsius=celsius + 10.0; } } private void button2_Click(object sender, EventArgs e) { listBox1.Items.Clear(); } private void button3_Click(object sender, EventArgs e) { Close(); } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { } } }
No hay comentarios:
Publicar un comentario