diff --git a/zad2/Main.java b/zad2/Main.java deleted file mode 100644 index a43e7ec..0000000 --- a/zad2/Main.java +++ /dev/null @@ -1,54 +0,0 @@ -import java.util.ArrayList; -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - ArrayList f = new ArrayList<>(); - ArrayList g = new ArrayList<>(); - int n; - Scanner scanner = new Scanner(System.in); - Polynomial polynomial; - - System.out.print("Podaj n: "); - n = scanner.nextInt(); - polynomial = new Polynomial(n); - System.out.print("Najwyższa potęga współczynników f: "); - n = scanner.nextInt(); - for (int i = 0; i <= n; ++i){ - System.out.print("x^" + i + " = "); - f.add(scanner.nextInt()); - } - System.out.print("Najwyższa potęga współczynników g: "); - n = scanner.nextInt(); - for (int i = 0; i <= n; ++i){ - System.out.print("g^" + i + " = "); - g.add(scanner.nextInt()); - } - -// polynomial = new Polynomial(2); -// f.add(1); -// f.add(1); -// f.add(1); -// f.add(0); -// f.add(1); -// -// g.add(0); -// g.add(1); -// g.add(1); - - ArrayList result = polynomial.multiply(f, g); - for (Integer i : result){ - System.out.print(i + " "); - } - System.out.println(); - result = polynomial.divide(f, g); - for (Integer i : result){ - System.out.print(i + " "); - } -// System.out.println(); -// result = polynomial.nwd(f, g); -// for (Integer i : result){ -// System.out.print(i + " "); -// } - } -}