Annotation of coherent/a/usr/src/sample/example1.c, revision 1.1.1.1

1.1       root        1: /* This a simple C program that computes the results of three
                      2:  * different rates of inflation over a span of ten years.
                      3:  * Use this text file to learn how to use MicroEMACS commands
                      4:  * to make creating and editing text files fast, efficient, and
                      5:  * easy.
                      6:  */
                      7: #include <stdio.h>
                      8: main()
                      9: {
                     10:        int i;          /* count ten years */
                     11:        float w1, w2, w3;       /* three inflated quantities  */
                     12:        char  *msg = " %2d\t%f %f\n";  /* printf string */
                     13:        i = 0;
                     14:        w1 = 1.0;
                     15:        w2 = 1.0;
                     16:        w3 = 1.0;
                     17:        for (i = 1; i<= 10; i++) {
                     18:                w1 *= 1.07;     /*  apply inflation */
                     19:                w2 *= 1.08;
                     20:                w3 *= 1.10;
                     21:                printf (msg, i, w1, w2, w3);
                     22:        }
                     23: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.