Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ios>
- #include <ostream>
- #include <cmath>
- using namespace std;
- int n;
- int main() {
- cin >> n;
- for(int i = 1; i <= 4; i++){
- if(i % 2 == 1){
- for(int j = 3; j >= 0; j--){
- cout << pow(n+j,2) << " ";
- }
- cout << endl;
- }
- else{
- for(int j = 0; j <= 3; j++){
- cout << pow(n+j,2) << " ";
- }
- cout << endl;
- }
- n = n + 4;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement