fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int term1 = 2 ;
  6. int term2 = term1 * term1;
  7. int term3 = term2 * term2;
  8. int term4 = term3 * term3;
  9. int term5 = term4 * term4;
  10. int total = term1 + term2 + term3 + term4 + term5;
  11. cout<<term1<<"+"<<term2<<"+"<<term3<<"+"<<term4<<"+"<<term5<<endl;
  12. cout<<"sum"<<total<<endl;
  13.  
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
2+4+16+256+65536
sum65814