You are on page 1of 1

#include<iostream>

using namespace std;


int main()
{
int iNum = 0;
cout << "Please enter a positive number" << endl;
cin >> iNum;
int i = 0;
int temp=0;
while (iNum)
{
cout << "The value we get after iNum >> 1 is performed" << " " <<( iNum >> 1)<<
endl;
cout << "Here value of i is " << i << endl;
iNum = iNum >> 1;
i++;
if (!iNum)
break;

}
cout << i << " " << " is required answer ( means value of i)" << endl;