

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Questions & Answers
- C# Program to Convert Fahrenheit to Celsius
- C++ program to convert Fahrenheit to Celsius
- C# Program to perform Celsius to Fahrenheit Conversion
- Convert Fahrenheit to Celsius using C Program
- Program for Celsius To Fahrenheit conversion in C++
- Program for Fahrenheit to Celsius conversion in C
- How does a refrigerator keep the temperature cool inside it?
- Creating a Function module in ABAP to take any table and write it to the screen
- How to covert ConcurrentLinkedQueue to array in android?
- How long does it take to learn Python?
- Program to find how many years it will take to reach t amount in Python
- Program to find number of days it will take to burn all trees in python
- Take all records from one MySQL table and insert it to another?
- Program to find how long it will take to reach messages in a network in Python
- Golang Program to read the marks of subjects and display the Grade
Advertisements