为什么输出的结果好乱啊?
输出的结果不能对齐,显得很难看清楚,该怎么改一下啊?顺便告诉下我为什么,本人较傻。谢谢,好人平安
#include<stdio.h>
#include<string.h>
#define N 5
struct add
{
char name[10];
char tel1[20];
char tel2[20];
char addr[15];
char email[30];
};
main()
{
struct add people[N]={{"Jack","13800000000","13800000001","shanghai","Jack@},{"Mary","13900000000","13900000001","unknow","Mary@},
{"John","15100000000","05168320000","beijing","John@},{"Smith","15200000000","unknow","unknow"," Rose#},{"Rose","15600000000","152000000002","xzit","unknow"}};
printf("姓名\t电话1\t电话2\t住址\t邮箱\n");
for(int i=0;i<N;i++)
{
printf("%s\t %s\t %s\t %s\t %s\n",people[i].name,people[i].tel1,people[i].tel2,people[i].addr,people[i].email);
}
}