#include <iostream.h>
#include <iomanip.h>
void main()
{
float i = 12.12345, j = 1.12345, k = 123456;
cout.precision(4);
cout << "i=" << setw(12) << i << '\n'
<< "j=" << setw(12) << j << '\n'
<< "k=" << setw(12) << k << endl;
}
//Ausgabe:
//i= 12.12
//j= 1.123
//k= 1.235e+05
| © 1997 Gottfried Rudorfer, C++-AG, Lehrveranstaltungen, Abteilung für Angewandte Informatik, Wirtschaftsuniversität Wien, 1/11/1999 |