Computer Science, asked by harsh19647047, 1 year ago

write a program for it in java

wap to input the temperature in degree centigrade and convert it into degree fahrenheit........

please reply as fast as you can it's very urgent.....

ple....​

Answers

Answered by ashlesha29
3

Answer:

import java.io.*;

class temperature

{

public static void main(String args []) throwsIOException

{

int tf, tc;

InputStreamReader read=new InputStreamReader(System.in);

BufferedReader in=new BufferedReader (read);

System.out.println("Enter the temperature in farenheit");

tc=Integer.parseInt(in.readLine());

tf=(tc*1.8)+32;

System.out.printeln("The temperature is:"+tc);

}

}

instructions

[]these are Square brackets

throws io exception is with one space after string args

you can also use scanner one input

just check spaces if any might be wrong

rest is all correct


harsh19647047: thank
harsh19647047: youuuu
ashlesha29: its ok
ashlesha29: you are in icse 10class??
harsh19647047: yes but in 9th class
harsh19647047: what happen?
ashlesha29: oh nothing
ashlesha29: juz asking
harsh19647047: ookkk
Answered by Anonymous
0

Explanation:

JAVA

public class Celsius.

{

public static void main (String args[])

{ float Fahrenheit, Celsius;

Fahrenheit = 43;

Celsius = ((Fahrenheit-32)*5)/9;

System.out.println("Temperature in celsius is: "+Celsius);

Similar questions