7.3.. Napisati program za ispis osobina zadanog kvadranta, prema slijedeæoj tabeli:

Listing programa:

//07311005
package zad3;

import java.util.Scanner;

public class zad3 {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		System.out.println("Kvadrant");
		System.out.print("1-4");
		int ocjena = input.nextInt();
		switch (ocjena) {
		case 1:
			System.out.println("x>0 i y>0");
			break;
		case 2:
			System.out.println("x<0 i y>0");
			break;
		case 3:
			System.out.println("x<0 i y<0");
			break;
		case 4:
			System.out.println("x>0 i y<0");
			break;
	
		default:
			System.out.println("Unijeli ste pogresan broj. ");
			break;
		}
	}
}

Ispis na ekranu:

Index