我想简单地在表格中输出一些结果,而不会出现任何偏移问题。为了清楚起见,不要担心只是伪代码的 foreach 和值的输出。
print "\n ______________________________________________________";
print "\n | |";
print "\n | Title |";
print "\n +______________________________________________________+";
print "\n | | |";
print "\n | City | Size |";
print "\n |__________________________|___________________________|";
#Sort by highest scores
################################
foreach (city, size)
{
print "\n | (city(value)";
print "| (size(value)";
}
有任何想法吗?