Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- FileOutputStream zapis = new FileOutputStream("Vysledek.txt");
- FileInputStream nacteni = new FileInputStream("Zadani.txt");
- Scanner scan = new Scanner(nacteni);
- Scanner sc = new Scanner(System.in);
- // System.out.println("Zadejte pocet radek matice:");
- int radky = Integer.parseInt(scan.next());
- if (radky <= 0) {
- while (radky <= 0) {
- System.out.println("Musi byt zadane kladne cislo:");
- radky = sc.nextInt();
- }
- }
- System.out.println("Zadejte pocet sloupcu matice:");
- int sloupce = Integer.parseInt(scan.next());
- if (sloupce <= 0) {
- while (sloupce <= 0) {
- System.out.println("Musi byt zadane kladne cislo:");
- sloupce = sc.nextInt();
- }
- }
Add Comment
Please, Sign In to add comment