सबसे पहले, सेल्सियस तापमान सेट करें -
double celsius = 36;
Console.WriteLine("Celsius: " + celsius); अब इसे फारेनहाइट में बदलें:
fahrenheit = (celsius * 9) / 5 + 32;
सेल्सियस को फारेनहाइट में बदलने के लिए आप निम्न कोड चलाने का प्रयास कर सकते हैं।
उदाहरण
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Demo {
class MyApplication {
static void Main(string[] args) {
double fahrenheit;
double celsius = 36;
Console.WriteLine("Celsius: " + celsius);
fahrenheit = (celsius * 9) / 5 + 32;
Console.WriteLine("Fahrenheit: " + fahrenheit);
Console.ReadLine();
}
}
} आउटपुट
Celsius: 36 Fahrenheit: 96.8