Archived
1
0
This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SomeLab/CS/lab15/15_1/Form1.cs
2026-03-19 19:39:01 +08:00

33 lines
744 B
C#

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();
}
}
}