C# windows form application that converts the temperature from Fahrenheit to Celsius

C# windows form application that converts the temperature from Fahrenheit to Celsius

Convert the temperature from Fahrenheit to Celsius:

Object: Write a C# program windows form application that temperature conversion program that converts from Fahrenheit to Celsius. The Fahrenheit temperature should be entered from the keyboard. C# windows form application projects with source code.

Fahrenheit to Celsius Formula:

(((f – 32)) * 5 / 9);

Code:

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 code

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void label1_Click(object sender, EventArgs e)

        {

        }

        private void button2_Click(object sender, EventArgs e)

        {

            textBox1.Clear();

            ans.Text = “0”;

        }

        private void button3_Click(object sender, EventArgs e)

        {

            Application.Exit();

        }

        private void button1_Click(object sender, EventArgs e)

        {

            double con, f;

            f = Convert.ToDouble(textBox1.Text);

            con = (((f – 32)) * 5 / 9);

            ans.Text = con.ToString();

        }

        private void Form1_Load(object sender, EventArgs e)

        {

        }

    }

}

Output:

C# windows form application that converts the temperature from Fahrenheit to Celsius
C# windows form application that converts the temperature from Fahrenheit to Celsius

Create a Simple Calculator in C# Windows form Application with Source Code

C# Programs Sample Code:

No.C# Projects with source code
1Implement bubble sort in C# the value of array given by the users
2Write a C# program of throwing an exception when dividing by zero condition occurs
3Create a Simple Calculator in C# Windows form Application with Source Code
4C# windows form application projects with source code
5C# Program that read array display the smallest integer and sort the array in ascending order by using Array.Sort method.
6Write a C# program to demonstrate the multiple inheritances
7C# Program Create an inheritance hierarchy that a bank might use to represent the customer’s bank accounts.
8C# program that defines a class to represent a bank account which includes the following member
9Develop a C# app that will determine the gross pay for each of three employees
10Write a C# program that reads two arrays and checks whether they are equal.

Hi, I am M.A Siddiqui. I'm a Computer Science Student, In this website, I'm teaching you Multiple languages and provides Projects and other Subjects Notes.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *