6.4.. Napisati program za pretvaranje Kelvinovih stepena u Celzujsove stepene.

Opis rješenja: Odnos Kelvinovih i Celzujsovih stepeni je C := K - 273.15.

Opis programa:

Listing programa:

package zadatak;
import java.util.Scanner;
public class P06411098 {
    public static void main(String[] args)	{
    Scanner input = new Scanner (System.in);
 
    System.out.print("Unesi temperaturu u Kelvinima: ");
    double k=input.nextDouble();
    System.out.println("Temperatura u Celzijusima je:"+(k-273.15));
}}

Ispis na ekranu:

Index