6.4.. Napisati program koji za ispis rezultata izraza: x=abc/3 - de/2 . .

Listing programa :

package proba;
// 06431101
import java.util.Scanner;
public class P06431101 {

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

		int x;

		System.out.print("Unesite brojeve: ");
		int a = input.nextInt();
		int b = input.nextInt();
		int c = input.nextInt();
		int d = input.nextInt();
		int e = input.nextInt();

		x = a * b * c / 3 - d * e / 2;
		System.out.print("Rezultat je: " + x);
	}
}

Ispis na ekranu:

Index