forked from MartinThoma/LaTeX-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tippfehler korrigiert; Beispiele hinzugefügt
- Loading branch information
1 parent
deea483
commit 0a33619
Showing
8 changed files
with
68 additions
and
22 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ \section*{Anregungen, Verbesserungsvorschläge, Ergänzungen} | |
kann. Daher freue ich mich über jeden Verbesserungsvorschlag. | ||
|
||
Anregungen, Verbesserungsvorschläge und Ergänzungen können per | ||
Pull-Request gemacht werden oder mir per Email an [email protected] | ||
Pull-Request gemacht werden oder mir per E-Mail an [email protected] | ||
geschickt werden. | ||
|
||
\section*{Erforderliche Vorkenntnisse} | ||
|
@@ -32,3 +32,6 @@ \section*{Erforderliche Vorkenntnisse} | |
|
||
Die Unifikation wird wohl auch in \enquote{Formale Systeme} | ||
erklärt; das könnte also hier von Vorteil sein. | ||
|
||
Die Grundlagen des Kapitels \enquote{Parallelität} wurden in Softwaretechnik I | ||
(kurz: SWT I) gelegt. |
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
documents/Programmierparadigmen/scripts/c/fibonacci-imperativ.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
int fib(int n) { | ||
if (n < 0) { | ||
return -1; | ||
} | ||
|
||
int fib[2] = {0, 1}, tmp; | ||
|
||
for (; n > 0; n--) { | ||
tmp = fib[1]; | ||
fib[1] = fib[0] + fib[1]; | ||
fib[0] = tmp; | ||
} | ||
return fib[0]; | ||
} |
4 changes: 2 additions & 2 deletions
4
documents/Programmierparadigmen/scripts/haskell/fibonacci-akk.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
fibAkk n n1 n2 | ||
| (n == 0) = n1 | ||
| (n == 1) = n2 | ||
| (n == 0) = n1 | ||
| (n == 1) = n2 | ||
| otherwise = fibAkk (n - 1) n2 (n1 + n2) | ||
fib n = fibAkk n 0 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fib(0, A, _, A). | ||
fib(N, A, B, F) :- N1 is N - 1, | ||
Sum is A + B, | ||
fib(N1, B, Sum, F). | ||
fib(N, F) :- fib(N, 0, 1, F). |