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