Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package lab2;
- import java.util.Scanner;
- /**
- *
- * @author student
- */
- public class Lab2 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in); //nowy obiekt przez new
- int j = scanner.nextInt();
- System.out.println("Liczba to: " +j);
- int[]tab={1,2,3,4,5};
- int tab2[]= new int[5];
- for(int i=0; i<5; i++){
- tab2[i]=scanner.nextInt();
- }
- for(int i=0; i<5; i++){
- System.out.println("Liczba to: " +tab2[i]);
- }
- }
- }
- ale chyba nie dziala
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package lab2;
- import java.util.Scanner;
- /**
- *
- * @author student
- */
- public class Lab2 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in); //nowy obiekt przez new
- punkt p = new punkt(2,7);
- int x= p.getX();
- System.out.println("x= " +x);
- p.show();
- boolean b= p.check();
- System.out.println(b);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement