C PRIAMER PLAS 第六版 P276 第三题

作者在 2020-11-22 21:50:57 发布以下内容
#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');
    }
}
练习题 | 阅读 1193 次
文章评论,共0条
游客请输入验证码
浏览34989次