|
|
coherent
/* This a simple C program that computes the results of three
* different rates of inflation over a span of ten years.
* Use this text file to learn how to use MicroEMACS commands
* to make creating and editing text files fast, efficient, and
* easy.
*/
#include <stdio.h>
main()
{
int i; /* count ten years */
float w1, w2, w3; /* three inflated quantities */
char *msg = " %2d\t%f %f\n"; /* printf string */
i = 0;
w1 = 1.0;
w2 = 1.0;
w3 = 1.0;
for (i = 1; i<= 10; i++) {
w1 *= 1.07; /* apply inflation */
w2 *= 1.08;
w3 *= 1.10;
printf (msg, i, w1, w2, w3);
}
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.