CodePudding user response:
unsigned int x;
Cin & gt;> x;
int count=0;
for (int i=0; I & lt; 32. I++)
{
If (x & amp; 1 & lt; count++;
}
Cout & lt;return 0;
CodePudding user response:
unsigned int x;
Cin & gt;> x;
int count=0;
for (int i=0; I & lt; 32. I++)
{
If (x & amp; 1 & lt; count++;
}
Cout & lt;return 0;