Doubt on challange

#include
using namespace std;
int main()
{

int binary,mod,power=1,n;


int deci=0;

cin>>binary;
while(binary>0)
{
    mod = binary%10;
    deci = deci + (mod*power);
    binary=binary/10;
    power=power*2;
} 
cout<<deci<<endl;
return 0;

}
i m not able to write no of lines then perform

@uks.2610
I think your basics are not strong, Have you skipped some topics/vids.
I have made some changes in your code. Please look into it and if you feel any difficulty then comment.