c++ : 头文件<iomanip> setiosflags(ios::left) 左对齐
cout << setw(8) << x << " " << setw(8) << x*x << " " << setw(8) << x*x*x << endl;
cout << setw(8) << y << " " << setw(8) << y*y << " "<< setw(8) << y*y*y << endl;
cout << setw(8) << z << " " << setw(8) << z*z << " "<< setw(8) << z*z*z << endl;
8为列数。
c语言: