#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { double r=1; double a=2; double b=a; double n=50; int i=n; while (i>0) { if(i%2==0) { b=b*b; i=i/2; } else { r=r*b; i--; } } cout<<fixed<<r<<endl; system("pause"); return 0; }