统一归档20260319
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace _15_1
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CtoF_Click(object sender, EventArgs e)
|
||||
{
|
||||
double c = 9 * double.Parse(textboxC.Text) / 5 + 32;
|
||||
textboxF.Text = c.ToString();
|
||||
}
|
||||
|
||||
private void FtoC_Click(object sender, EventArgs e)
|
||||
{
|
||||
double f = (double.Parse(textboxF.Text) - 32) * 5 / 9;
|
||||
textboxC.Text = f.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user