WAP TO PRINT KELVIN TO CELSIUS program
Answers
Answered by
1
import java.io.*;
class KELCEL
{ public static void main()throws IOException
{
DataInputStream ak =new DataInputStream(System.in);
System.out.println("ENTER TEMPERATUR IN KELVIN");
double kel=Double.parseDouble(ak.readLine());
double cel=kel-273.15;
System.out.println("TEMPERATURE IN CELSIUS="+cel);
}
}
class KELCEL
{ public static void main()throws IOException
{
DataInputStream ak =new DataInputStream(System.in);
System.out.println("ENTER TEMPERATUR IN KELVIN");
double kel=Double.parseDouble(ak.readLine());
double cel=kel-273.15;
System.out.println("TEMPERATURE IN CELSIUS="+cel);
}
}
Answered by
8
ANSWER
.........
THE PROGRAM IS GIVEN BELOW
................
/** * C program ***********************
< to convert temperature from degree celsius >
to fahrenheit
*
/ #include
<stdio.h>
int main()
{
float celsius, fahrenheit;
/*
Input temperature in celsius
*/ printf
("Enter temperature in Celsius: ")
; scanf
("%f", &celsius); /*
celsius to fahrenheit conversion formula
*/ fahrenheit = (celsius * 9 / 5) + 32
; printf("%.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);
return 0;
}
.........
THE PROGRAM IS GIVEN BELOW
................
/** * C program ***********************
< to convert temperature from degree celsius >
to fahrenheit
*
/ #include
<stdio.h>
int main()
{
float celsius, fahrenheit;
/*
Input temperature in celsius
*/ printf
("Enter temperature in Celsius: ")
; scanf
("%f", &celsius); /*
celsius to fahrenheit conversion formula
*/ fahrenheit = (celsius * 9 / 5) + 32
; printf("%.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);
return 0;
}
Similar questions