6.4.. Napisati program koji izračunava i ispisuje rezultate:
ROUND (11.7)
ROUND(2,7)
ROUND(-2,6)
ROUND(-2,1)
ROUND(2,2)
1- ROUND(-1,9)

Opis rješenja:

Opis programa:

Listing programa:

package zadatak;
import java.util.Scanner;
public class P06411130 {
	public static void main(String[] args) {
		System.out.println(Math.round(11.7));
		System.out.println(Math.round(2.7));
		System.out.println(Math.round(-2.6));
		System.out.println(Math.round(-2.1));
		System.out.println(Math.round(2.2));
		System.out.print(1 - Math.round(-1.9));
	}
}

Ispis na ekranu:

Index