DALGLI0/zad1/Main.java
Cezary Baryłka c9e9b68a89 Zadanie 1
Program można uruchomić za pomocą polecenia: java Main 6
2018-07-08 22:21:24 +00:00

19 lines
463 B
Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n;
if(args.length == 0) {
System.out.println("Proszę podać n ");
Scanner scan = new Scanner(System.in);
n = scan.nextInt();
}
else{
n = Integer.parseInt(args[0]);
}
Ring ring = new Ring(n);
System.out.println(ring.findRingDetails());
}
}