@Andsteadur
153 / 137 / 3
Регистрация: 23.05.2009
Сообщений: 275
|
15.10.2012, 13:04
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| #include <iostream>
#include <iomanip>
using namespace std;
void main(void)
{
const int k = 5;
int a=10;
unsigned int b=15;
double d = 123.456789;
char c = 'W';
bool tf = true;
printf("k=%i; a=%i; b=%u; d=%f; okr do sotyx d=%1.2f; c=%c; tf=%i\n",k,a,b,d,d,c,tf);
cout.setf(ios::fixed);
cout<<"k="<<k<<"; a="<<a<<"; b="<<b<<"d="<<d
<<"; okr do sotyx; d="<<setprecision(2)<<d<<"; c="<<c<<" tf="<<tf<<endl;
} |
|
1
|