From df99b0273a6265897fd4717b3c4c2c1d9ccc2f87 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Tue, 27 Mar 2018 21:54:10 +0200 Subject: [PATCH] =?UTF-8?q?MP=5F03=20Verst=C3=A4ndnisfrage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03_FLOW_a/build.sh | 5 ++++- 03_FLOW_a/flow.out | Bin 0 -> 26656 bytes 03_FLOW_a/main_mp2_FLOW_a.cpp | 31 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) mode change 100644 => 100755 03_FLOW_a/build.sh create mode 100755 03_FLOW_a/flow.out diff --git a/03_FLOW_a/build.sh b/03_FLOW_a/build.sh old mode 100644 new mode 100755 index 9093d33..f01dc81 --- a/03_FLOW_a/build.sh +++ b/03_FLOW_a/build.sh @@ -1,2 +1,5 @@ #!/bin/bash -clang++ -std=c++14 -I ../helpers -o flow.out main_mp2_FLOW_a.cpp ../helpers/AnsiConsole.cpp +rm *.out +clang++-6.0 -std=c++14 -I ../helpers -o flow.out main_mp2_FLOW_a.cpp ../helpers/AnsiConsole.cpp + +./flow.out diff --git a/03_FLOW_a/flow.out b/03_FLOW_a/flow.out new file mode 100755 index 0000000000000000000000000000000000000000..9c7cb79e02f11eb9ef55f5ef38129a82144cd4d1 GIT binary patch literal 26656 zcmeHweR!1BnfFOT5EYVuAk>dCB4|*FnGizoW1SENCz@bNLQ6mJnJ^hhG|7zffx&HR z+<uTt#W&66lvR>*wqiEADrPNZhzu$Sz znLN*YXpPste{o=*``o{CpRfDe=RD{6x^uU;aeZMyfzY8){E;9xHs2#5>nOyyU$P3T z6=w^NxL8~yW&$b3&m&Vvt(c~#RMDEwQgTJ0Gw`b|w1C<|kBn$~kp-g$E9e%Ivc9R{ zQBjL-c3Z5bLbxQrd~EC3^^yhk%ZR3%*&u|Gbm1<^vw6%nq4G_re3}Z?eob}%*f;)K zReEco2ON11iE7mpr7T19o3VD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)Tq4NKk7F0AdKR?s4=huG+L;rmY{dX{QF`4=QDkHyskK@>KE5{-ljxA)` z&v%h#uV26KF;QVBe`N1zoR(xJ=~A P|1-mqD9p%^!HWL|arU@^ literal 0 HcmV?d00001 diff --git a/03_FLOW_a/main_mp2_FLOW_a.cpp b/03_FLOW_a/main_mp2_FLOW_a.cpp index dd18cd6..4811c4c 100644 --- a/03_FLOW_a/main_mp2_FLOW_a.cpp +++ b/03_FLOW_a/main_mp2_FLOW_a.cpp @@ -20,6 +20,26 @@ void recurse(int turns){ } +void test_Iteration() { + INITPRINT("Test Iteration"); + int array[6] = {}; + for(int i = 0; i <= 6; i++) { + PRINT; array[i] = 0; + } + +} + +void test() { + INITPRINT("Test"); + int array[6] = {}; + PRINT; array[0] = 0; + PRINT; array[1] = 0; + PRINT; array[2] = 0; + PRINT; array[3] = 0; + PRINT; array[4] = 0; + PRINT; array[5] = 0; +} + @@ -100,6 +120,7 @@ int func_1(int arg){ int main(int argc, const char * argv[]) { console.clearScreen(); + currentColor = Colors::BLUE; start_Sequence(); currentColor = Colors::RED; @@ -116,6 +137,16 @@ int main(int argc, const char * argv[]) { //start_interrupt(); //start_coroutine(); //start_exception(); + + + + + currentColor = Colors::WHITE; + test_Iteration(); + currentColor = Colors::MAGENTA; + test(); + + std::string s; std::cin >> s;