|
|
|
? как записать в переменную std::cout << std::bitset<4>(2) << '\n';
|
|||
|---|---|---|---|
|
#18+
std::cout << std::bitset<4>(2) << '\n'; Как в место 4 (явного числа) использовать переменную Как подсчитать количество 1 или 0 #include<iostream> #include<bitset> #include<string> using namespace std; void main() { int N,i,p=1,maxp; int prostoe[10]; cout<<"Vvedite max chislo N="; cin>>N; // Ввод данных for ( i = 1; i < N; i++) { if (i==2) { prostoe[p]=i; p++; } } maxp=p; //p=1; for ( p = 1; p < maxp; p++) { cout << "prostoe[" << p << "]: "; cout << prostoe[p] << endl; } std::cout << std::bitset<4>(2) << '\n'; } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.05.2005, 08:24 |
|
||
|
|

start [/forum/topic.php?fid=57&gotonew=1&tid=2033268]: |
0ms |
get settings: |
4ms |
get forum list: |
8ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
22ms |
get topic data: |
6ms |
get first new msg: |
3ms |
get forum data: |
2ms |
get page messages: |
21ms |
get tp. blocked users: |
1ms |
| others: | 205ms |
| total: | 276ms |

| 0 / 0 |
