fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. double base=2;
  7. unsigned exp=8;
  8. double value;
  9. for(value=1;exp;exp>>=1,base*=base) if(exp&1) value*=base;
  10. cout<<value<<endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
256