Browse Source

bedingte compilierung, 2

lookup-tables
Stephan Richter 7 years ago
parent
commit
603534c318
  1. 13
      src/main.c

13
src/main.c

@ -1,13 +1,18 @@ @@ -1,13 +1,18 @@
#include<stdio.h>
#define DEBUG
#define DEBUG 5
int main() {
int a=2, b=3, ergebnis;
ergebnis = (2*a) + (2*b);
#ifdef DEBUG
#if DEBUG >= 1
printf("* Debug: ergebnis = (2*%d) + (2*%d);\n", a, b);
#else
printf("Das Ergebnis ist %d\n", ergebnis);
#endif
#if DEBUG >= 2
printf("* Debug: a=%d, b=%d, ergebnis=%d\n", a, b, ergebnis);
#endif
printf("Das Ergebnis ist %d\n", ergebnis);
return 0;
}

Loading…
Cancel
Save