This file contains hidden or 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
| #include <stdio.h> | |
| int | |
| avarage1 ( int x, int y ) | |
| { | |
| int somme = 0; | |
| while ( x == y ) | |
| { | |
| x*=y; |
This file contains hidden or 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
| # $Id$ | |
| # Contributor: John Proctor <jproctor@prium.net> | |
| # Contributor: Daniel White <daniel@whitehouse.id.au> | |
| # Maintainer: Juergen Hoetzel <juergen@archlinux.org> | |
| # Contributor: Leslie Polzer (skypher) | |
| # Contributo: Sascha K. Biermanns <skbierm at yahoo dot de> | |
| pkgname=sbcl | |
| pkgver=1.2.8 | |
| pkgrel=1 |
This file contains hidden or 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
| ;;; ========================== | |
| ;;; Spiele - wir lieben Spiele | |
| ;;; ========================== | |
| (defun hole-zahl (string) | |
| "(hole-zahl string) | |
| HOLE-ZAHL gibt die Zeichenkette String aus und erzwingt die Eingabe einer Zahl." | |
| (format t "~A" string) |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <dirent.h> | |
| int main (int argc, char *argv[]) { | |
| if (argc == 1) { | |
| printf("usage: %s <directory>\n", argv[0]); | |
| exit(EXIT_SUCCESS); | |
| } |
This file contains hidden or 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 was a task from a programming learn book | |
| // You'll have to crack a code. You must enter for every character from A to H | |
| // and from a to h a number. To get the real numbers you know the following: | |
| // 1. Aa, Bb, Cc, Dd, Ee, Ff, Gg and Hh are prime numbers. | |
| // 2. ABC is a multiple of Aa. | |
| // 3. abc is equal to cba. | |
| // 4. CDE is the product of Cc times the checksum of CDE. | |
| // 5. Bb is equal to the checksum of cde. | |
| // 6. EFG is a multiple of Aa. | |
| // 7. efg is the product of Aa times the checksum of efg. |
This file contains hidden or 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
| // Macro for using the swap-function | |
| #define SWAP(a,b) swap(&(a),&(b),sizeof(a)) | |
| // swap - a generic swap-algorithmus | |
| void swap(void *va /* vektor object a */, | |
| void *vb /* vektor object b */, | |
| size_t i /* length of the objects */ ) | |
| { | |
| uint8_t temp; // address for buffering one byte | |
| uint8_t * a = va; // bytewise moving pointer to va |
This file contains hidden or 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
| // Another C program for printing a word square | |
| // compile via c99 -o wordsquare wordsquare.c | |
| #include <stdio.h> // for printf | |
| #include <stdlib.h> // for getenv, atoi, abs | |
| #include <stdbool.h> // for bool, true, false | |
| #include <string.h> // strlen | |
| // -------------------------------------------------------------------------- | |
| // Declaration: solution_square |
This file contains hidden or 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
| // another C program for printing a star pyramid | |
| // You can start it via setting the number of rows | |
| // via a environment variable like | |
| // export rows=19 | |
| // otherwise the program will ask you for a number | |
| // of rows | |
| // compile via c99 -o star star.c | |
| #include <stdio.h> // for printf | |
| #include <stdlib.h> // for getenv, atoi |
This file contains hidden or 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
| # include <stdio.h> | |
| # include <stdlib.h> | |
| int main() | |
| { | |
| // Aa, Bb, Cc, Dd, Ee, Ff, Gg, Hh sind Primzahlen | |
| // jedoch ergibt sich aufgrund der Aufgabenstellung, das keine der Variablen die Ziffer 0 repräsentieren | |
| // kann, daher ergibt sich ein Feld aus den folgenden Primzahlen: | |
| const int primzahl[] = { 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 }; | |
| // Ersatzweise hätte diese Liste auch mit Hilfe des Sieb des Erasthostenes erstellt werden können. | |
| const int primzahlen = sizeof primzahl; |
This file contains hidden or 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 is compileable with a C99 or C11 compatible compiler | |
| // use: gcc with parameters -std=c99 or -std=c11 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| // routine: is_unwanted | |
| // task: checks if a character is one of the list of unwanted characters | |
| // ----------------------------------------------------------------------- |
NewerOlder