The "bad" getting started
This commit is contained in:
parent
9183869a50
commit
8e2f5c1ff0
23
modernc/01.1/bad.c
Normal file
23
modernc/01.1/bad.c
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* This may look like nonsense, but really is -*- mode: C -*- */
|
||||||
|
|
||||||
|
/* The main thing that this program does. */
|
||||||
|
void main() {
|
||||||
|
// Decralations
|
||||||
|
int i;
|
||||||
|
double A[5] = {
|
||||||
|
9.0,
|
||||||
|
2.9,
|
||||||
|
3.E+25,
|
||||||
|
.00007,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Doing some work
|
||||||
|
for (i = 0; i < 5; ++i) {
|
||||||
|
printf("element %d is %g, \tits square is %g\n",
|
||||||
|
i,
|
||||||
|
A[i],
|
||||||
|
A[i]*A[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user