标题:为什么不能循环,输入号码,6+最后五位数;若我吧下划线改为scanf("%d%c",& ...
取消只看楼主
亢奋青年
Rank: 2
来 自:遵义市
等 级:论坛游民
帖 子:64
专家分:28
注 册:2013-11-2
结帖率:75%
已结贴  问题点数:1 回复次数:0 
为什么不能循环,输入号码,6+最后五位数;若我吧下划线改为scanf("%d%c",&n,&haoma[0]);就能行呢??
#include<stdio.h>

int main ()
{
    int n,j;
    char haoma[12];
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
        gets(haoma);
        printf("6%c%c%c%c%c\n",haoma[7],haoma[8],haoma[9],haoma[10],haoma[11]);
    }
    return 0;
   
}
搜索更多相关主题的帖子: 下划线 
2013-11-09 16:14



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




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

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