6.3.16. Ucitati 4 prirodna broja i izracunati drugi korijen sume koristeci samo varijable x, s i korijen.

Listing programa:

package Zadatak;
import java.util.Scanner;
public class P06411158 {

73
package test;

import java.util.Scanner;

public class Zad9 {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);

		System.out.print("Unesite brojeve: ");
		int x = input.nextInt();
		int s = input.nextInt();

		double korijen = x + s;

		x = input.nextInt();
		s = input.nextInt();

		korijen = x + s;

		System.out.print("Rezultat je: " + Math.sqrt(Math.sqrt(korijen)));
	}
}

Ispis na ekranu:

Index