6.4.. Napisati program za izračunavanje sume, proizvoda i razlike dva učitavana broja.

Opis rješenja:

Opis programa:

Listing programa:

// 06411094
package zadatak;
import java.util.Scanner;
public class P06411094 {
    public static void main(String[] args)	{
    Scanner input = new Scanner (System.in);

	System.out.println("Dva broja: ");
	int x = input.nextInt();
	int y = input.nextInt();

	System.out.println("x+y="+(x+y));
	System.out.println("x-y="+(x-y));
	System.out.println("y-x="+(y-x));
	System.out.println("x*y="+(x*y));
	}
}

Ispis na ekranu:

Index