- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Golang Program to Take the Temperature in Celsius and Covert it to Farenheit
Steps
- Take the value of temperature in Celsius and store it in a variable.
- Convert it to Fahrenheit.
- Print the final result.
Enter the temperature in Celsius: 32 Temperature in Fahrenheit is: 89.6 | Enter the temperature in Celsius: 48 Temperature in Fahrenheit is: 118.4 |
Explanation
- User must first enter the value of temperature in Celsius.
- Using the formula: f=(c*1.8)+32, convert Celsius to Fahrenheit.
- Print the temperature in Fahrenheit.
Example
package main import "fmt" func main(){ var n int fmt.Print("Enter the temperature in Celsius:") fmt.Scanf("%d", &n) f:=(float32(n)*1.8)+32 fmt.Println("Temperature in Fahrenheit is:", f) }
Output
Enter the temperature in Celsius:32 Temperature in Fahrenheit is: 89.6
- Related Articles
- Convert the temperature of 573 K to the Celsius scale.
- Convert temperature of 32°F to Celsius scale.
- Average temperature of Delhi and Antarctica in the month of May is 36 ° Celsius and -8° Celsius respectively. Find the difference between the two temperatures.
- In countries like USA and Canada, temperature is measured in Fahrenheit, whereas in countries like India, it is measured in Celsius. Here is a linear equation that converts Fahrenheit to Celsius:[mathrm{F}=left(frac{9}{5}right) mathrm{C}+32](i) Draw the graph of the linear equation above using Celsius for t-axis and Fahrenheit for ( y )-axis.(ii) If the temperature is ( 30^{circ} mathrm{C} ), what is the temperature in Fahrenheit?(iii) If the temperature is ( 95^{circ} mathrm{F} ), what is the temperature in Celsius?(iv) If the temperature is ( 0^{circ} mathrm{C} ), what is the temperature in Fahrenheit and if the temperature is ( 0^{circ} mathrm{F} ), what is the temperature in Celsius?(v) Is there a temperature which is numerically the same in both Fahrenheit and Celsius? If yes, find it.
- Write the relation between Kelvin scale and Celsius scale of temperature.
- The Kelvin temperature is 270 K. What is the corresponding Celsius scale temperature?
- The temperature of a city is 4 degree Celsius. Next day the temperature falls by 5 degree Celsius. What is the temperature of the city next day?
- What is the formula to convert temperature in the Fahrenheit scale to the Centigrade or Celsius scale?
- Convert the following temperature to Celsius scale:(a) 300 K(b) 573 K
- The Kelvin scale temperature is 0 K. What is the corresponding Celsius scale temperature?
- How to convert Celsius to Fahrenheit and Fahrenheit to Celsius?
- What is the relationship between the Kelvin, Celsius and Fahrenheit scales of temperature?
- C# Program to Convert Fahrenheit to Celsius
- C++ program to convert Fahrenheit to Celsius
- How to covert ConcurrentLinkedQueue to array in android?

Advertisements