1/*
2 Copyright(C) 1998
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : January 1, 1998.
11 author : Salih Yurttas.
12
13 io_01.c
14*/
15
16
17#define D_K 16.0
18
19#define N 4
20
21int main(int argc, char *argv[]) {
22
23 double d_a[N];
24
25 int i;
26
27 printf("\nfree formatted doubles -\n");
28
29 for(i=0; i<N; ++i) {
30 d_a[i] = D_K;
31 printf("%f\n", d_a[i]);
32 }
33
34 printf("\nformatted doubles -\n");
35
36 for(i=0; i<N; ++i)
37 printf("%16f\n", d_a[i]);
38
39 printf("\nfree formatted scientific notation [e|E] -\n");
40
41 for(i=0; i<N; ++i)
42 printf("%e\n", d_a[i]);
43
44}