Yurttas/PL/OOL/Cplusplus/F/06/01/io 13.cpp

 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_13.cpp
14*/
15
16
17#include <iostream>
18
19#include <fstream>
20
21using namespace std;
22
23ofstream T("io_13.out");
24
25const double D_K=16.0;
26
27const int N=4;
28
29int main(int argc, char* argv[]) {
30
31  double d_a[N];
32
33  int i=16;
34
35  T << endl;
36  T << "1--";
37  T << endl;
38
39  T << i << endl;
40
41  T << endl;
42  T << "2--";
43  T << endl;
44
45  T.setf(ios::showpoint);
46
47  for(int i=0; i<N; ++i) {
48    d_a[i] = D_K;
49    T << d_a[i] << endl;
50  }
51
52}