প্রথমে ফারেনহাইট তাপমাত্রা সেট করুন:
double fahrenheit = 97;
Console.WriteLine("Fahrenheit: " + fahrenheit);
এখন সেলসিয়াসে রূপান্তর করুন:
celsius = (fahrenheit - 32) * 5 / 9;
সম্পূর্ণ উদাহরণ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Demo {
class MyApplication {
static void Main(string[] args) {
double celsius;
double fahrenheit = 97;
Console.WriteLine("Fahrenheit: " + fahrenheit);
celsius = (fahrenheit - 32) * 5 / 9;
Console.WriteLine("Celsius: " + celsius);
Console.ReadLine();
}
}
}
আউটপুট
Fahrenheit: 97 Celsius: 36.1111111111111
সূত্র: °C = (°F - 32) × 5/9