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 helloworld;
- import java.util.Scanner;
- /**
- *
- * @author local
- */
- public class HelloWorld {
- public void wczytajLiczbeZKlawiatury() {
- Scanner input = new Scanner(System.in);
- String text = input.nextLine();
- }
- public void wypelnijTablice() {
- int[]tab = new int[10];
- for (int i=0; i<10; i++){
- tab[i]= i+2;
- System.out.println(tab[i]);
- }
- }
- public void wypiszTabliceOdKonca() {
- int[]tab2 = new int[10];
- for (int i=0; i<10; i++){
- tab2[i]= i+2;
- }
- for (int i=9; i>=0; i--){
- System.out.println(tab2[i]);
- }
- }
- public static void main(String[] args) {
- // TODO code application logic here
- System.out.println("Hello World");
- HelloWorld h = new HelloWorld();
- h.wczytajLiczbeZKlawiatury();
- System.out.println("\n");
- h.wypelnijTablice();
- System.out.println("\n");
- h.wypiszTabliceOdKonca();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement