diff --git a/src/Makefile b/src/Makefile index e7764b3537c1aec0e10d8769bc83219b316bfb9e..c23e2340309efa1c8339783dc7142a1a0c5a4079 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,4 @@ -all: question_3 question_5 question_9 +all: question_3 question_5 question_9 question_10 question_3: question_3.cpp g++ -o ./bin/question_3 question_3.cpp -Wall -Wextra -lgmp -lgmpxx diff --git a/src/question_10.cpp b/src/question_10.cpp index 823e12cff9da645b18e74d4d86b6c31b3774a5f3..13fed30a6a204e5aaf2fd0e30cf498741e4053b8 100644 --- a/src/question_10.cpp +++ b/src/question_10.cpp @@ -50,6 +50,6 @@ int main(int argc, char** argv) { t = algo_k_root(a, k, res); - std::cout << k << "\t" << t << std::endl; + std::cout << a << "\t" << k << "\t" << t << std::endl; return 0; } diff --git a/src/question_10.sh b/src/question_10.sh new file mode 100755 index 0000000000000000000000000000000000000000..523827cb86969ad063f538e6a7a22540c32503c0 --- /dev/null +++ b/src/question_10.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [ -f ./data/question_10.txt ] + then rm -f ./data/question_10.txt +fi +touch ./data/question_10.txt +for i in `seq 1 1 20`; +do + ./bin/question_10 2 $i >> ./data/question_10.txt +done