fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a,b;
  6. cin >> a >> b;
  7. for (long long int i = a; i < b+1; i++)
  8. cout << i * i << ' ';
  9. cout << endl;
  10. for (long long int j = b; j > a-1; j--)
  11. cout << j * j * j << ' ';
  12. return 0;
  13. }
Success #stdin #stdout 0s 15232KB
stdin
5 10
stdout
25 36 49 64 81 100 
1000 729 512 343 216 125