Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.util.Scanner;
- public class PracaZplikiem3{
- public static void main(String[] args) throws FileNotFoundException
- {
- int[] tablica;
- File file = new File("data.txt");
- Scanner in = new Scanner(file);
- int liczbaElementow = in.nextInt();
- tablica= new int[liczbaElementow];
- for(int i=0; i<tablica.length; i++)
- tablica[i] = i+1;
- while(file !=null){
- System.out.println(tablica);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement