标题:为什么输出的结果好乱啊?
取消只看楼主
时间都会给你
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2016-12-21
结帖率:75%
 问题点数:0 回复次数:1 
为什么输出的结果好乱啊?
输出的结果不能对齐,显得很难看清楚,该怎么改一下啊?
顺便告诉下我为什么,本人较傻。谢谢,好人平安


#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);
    }
}
搜索更多相关主题的帖子: shanghai beijing include people email 
2016-12-26 16:51
时间都会给你
Rank: 1
等 级:新手上路
帖 子:80
专家分:0
注 册:2016-12-21
得分:0 
回复 3楼 九转星河
厉害了我的哥,谢谢了。
2016-12-26 22:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-472952-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.151668 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved