|
|
|
? как записать в переменную 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:24 |
|
||
|
|

start [/forum/search_topic.php?author=SuperChainik&author_mode=last_topics&do_search=1]: |
0ms |
get settings: |
9ms |
get forum list: |
13ms |
get settings: |
8ms |
get forum list: |
18ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
55ms |
get topic data: |
7ms |
get first new msg: |
4ms |
get forum data: |
2ms |
get page messages: |
34ms |
get tp. blocked users: |
1ms |
| others: | 643ms |
| total: | 800ms |

| 0 / 0 |
