![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Program to perform Celsius to Fahrenheit Conversion
Firstly, set the Celsius temperature −
double celsius = 36; Console.WriteLine("Celsius: " + celsius);
Now convert it into Fahrenheit:
fahrenheit = (celsius * 9) / 5 + 32;
You can try to run the following code to convert Celsius to Fahrenheit.
Example
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(); } } }
Output
Celsius: 36 Fahrenheit: 96.8
Advertisements