瀏覽代碼

Format codes instead of string sample

Use less space
DricomDragon 5 年之前
父節點
當前提交
22cbfb2428
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      colors/main.cpp

+ 1 - 2
colors/main.cpp

@@ -32,9 +32,8 @@ int main() {
 	for (int cat(0) ; cat <= 8 ; cat ++) {
 		for (int kind(3) ; kind <= 4 ; kind ++) {
 			for (int color(0); color <= 7; color ++) {
-				cout << cat << ';' << kind << color << endl;
 				cout << "\033[" << cat << ';' << kind << color << 'm';
-				cout << "Sample #|!0123456789AaBbCc";
+				cout << cat << ';' << kind << color;
 				resetColor();
 				cout << endl;
 			}