标题:C PRIAMER PLAS 第六版 P276 第三题
取消只看楼主
hbccc
Rank: 5Rank: 5
等 级:职业侠客
威 望:5
帖 子:108
专家分:315
注 册:2020-2-18
结帖率:83.33%
 问题点数:0 回复次数:1 
C PRIAMER PLAS 第六版 P276 第三题
#include <stdio.h>
void small(char,int,int);
int main(void)
{
    int x,y;
    char ch;
    printf("zifu:");
    ch=getchar();
    printf("lie:");
    scanf("%d",&y);
    printf("lines:");
    scanf("%d",&x);
        
    small(ch,x,y);   
    return 0;
   
}

void small(char c,int a,int b)
{
    for(int i=0;i<a;i++)
    {
        for(int j=0;j<b;j++)
        {
            putchar(c);
        }
        putchar('\n');
    }
}
搜索更多相关主题的帖子: printf void int char for 
2020-11-22 21:50
hbccc
Rank: 5Rank: 5
等 级:职业侠客
威 望:5
帖 子:108
专家分:315
注 册:2020-2-18
得分:0 
呵呵,没有困难,只是终于自己写好了,发过来显摆一下。谢谢关注。
2020-11-23 12:24



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




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

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