0

Celsius to Fahrenheit converter

You are making a Celsius to Fahrenheit converter. Write a function to take the Celsius value as an argument and return the corresponding Fahrenheit value. Sample Input 36 Sample Output 96.8

10th Jan 2021, 8:26 AM
Deepanshi 😍
Deepanshi 😍 - avatar
6 Answers
+ 2
Deepanshi 😍 I noted you haven't provided a sample for us to look at, so I won't post the answer, but will give you some tips. Google "Celcius to Farenheit" and get the formula / equation you need. You will need to create an input which will accept an integer. Write your code so the input will be converted by the equation from celcius to farenheit print the output PS: This is 3 lines of simple code. Give it a go!
10th Jan 2021, 9:57 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Please identify the language you are using in the tag so people may provide you with relevant advice. Also, custom demands that you provide an example of your attempt so we may assess where you are struggling. You won't learn much if you only get answers
10th Jan 2021, 8:54 AM
Rik Wittkopp
Rik Wittkopp - avatar
13th Aug 2022, 9:27 AM
Adebayo Abdul Salam
Adebayo Abdul Salam - avatar
0
It's python
10th Jan 2021, 9:03 AM
Deepanshi 😍
Deepanshi 😍 - avatar
0
Thanks
10th Jan 2021, 9:58 AM
Deepanshi 😍
Deepanshi 😍 - avatar
0
import java.util.Scanner; public class Program { //your code goes here static double fahr(float celsius){ double result = (1.8*celsius)+32; return result; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); double c = sc.nextDouble(); float convert= (float)c; //Correct once is this System.out.println(fahr(convert)); } }
4th Oct 2023, 2:05 PM
Mohammad Meeran Waseem Siddiqui
Mohammad Meeran Waseem Siddiqui - avatar