格式化输出
//格式化输出 //2017.3.7 #include <stdio.h> #include <stdlib.h> int main() { printf("%-10s %-10s %-10s %-10s %-10s\n", "name", "number", "math", "english", "fuck"); printf("%-10s %-10s %-10s %-10s %-10s\n", "lisan", "1001", "77.30", "87.0", "80"); printf("%-10s %-10s %-10s %-10s %-10s\n", "mike", "1002", "70.00", "80.0", "90"); printf("%-10s %-10s %-10s %-10s %-10s\n", "james", "1003", "95.20", "76.0", "78"); system("pause"); }