fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. int N;
  7. cin >> N;
  8.  
  9. cout << "Square of " << N << " is " << (N * N) << "\n";
  10. cout << "Cube of " << N << " is " << (N * N * N) << "\n";
  11.  
  12. return 0;
  13. }
  14.  
  15.  
Success #stdin #stdout 0.01s 5316KB
stdin
4
stdout
Square of 4 is 16
Cube of 4 is 64