#include <stdio.h> #include <math.h> int main() { int n, i, j, row, col; char c; if (scanf("%d %c", &n, &c)!=EOF){ col = n; // 列数就是边长 row = round(n / 2.0); // 行数是列数的50% for (i = 0; i < row; i++) { for (j = 0; j < col; j++) { printf("%c", c); } printf("\n"); } } return 0; }
c语言编程练习题:7-160 跟奥巴马一起画方块
作者:yunjinqi
类别:编程
日期:2023-05-31 18:02:26
阅读:610 次
消耗积分:0 分
版权所有,转载本站文章请注明出处:云子量化, https://www.yunjinqi.top/article/285
最新文章
系统当前共有 404 篇文章