From 37f8e9dbf6a9a6b53c09ae73876bf1e23cea642a Mon Sep 17 00:00:00 2001 From: dymik739 Date: Sat, 18 Mar 2023 12:58:26 +0200 Subject: [PATCH] add correct variable type code patcher --- labs/2/transform-to-double.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 labs/2/transform-to-double.sh diff --git a/labs/2/transform-to-double.sh b/labs/2/transform-to-double.sh new file mode 100644 index 0000000..840698d --- /dev/null +++ b/labs/2/transform-to-double.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +sed -i 's/int/double/g;s/prdouble/print/g;s/Integer.parseInt/Double.parseDouble/g;s/for (double i/for (int i/g;s/for (double j/for (int j/g;s/matrix.py/double-matrix.py/g;s/double p/int p/g;s/double bytesRead/int bytesRead/g;s/double ref_length/int ref_length/g;s/double new/int new/g;s/%4d/%4.3f/g' Matrix.java Main.java + +javac Main.java Matrix.java +rm random_matrix.txt