- #include <stdio.h>
- int getint(int port) {
- int tmp;
- if (scanf ("%d", &tmp)
== EOF)
- exit(0);
- return tmp;
- }
- #define putint(port,value) \
- printf("%d
", value)
- static int d;
- static int e;
- static int i;
- static int out_1;
- static int a;
- static int b;
- static int c;
- main() {
- start:
- init:
- i = getint (1);
- b = 0;
- e = 0;
- loop:
- a = (i) - (b);
- c = (a) - (e);
- d = (c) + (e);
- out_1 = putint (1,(a)+((b)+((c)+(d))));
- next:
- i = getint (1);
- b = d;
- e = c;
- goto loop;
- }
|
FEATURES
- the obtained C is closed to the TCDF.
- It consists to the algebra initializations
- followed by the variables declarations.
- Then the program really start
- with the state variables initialization and inputs reads.
- The loop body computes the temporary variables and the next state values.
- The new state is bound, and the program jumps to the loop section.
|