作者ahongyeh (小葉子)
看板TransCSI
標題Re: [問題] 一題小考題目
時間Tue Oct 31 14:12:54 2006
#include<stdio.h>
main(){
int n,i,j;
printf("Please input the size of side of square (1~20) : ");
scanf("%d",&n);
for(i=1;i<=n;i++){
for(j=1;j<=n;j++)
printf("*");
printf("\n");
}
}
※ 引述《myemail (頻可欣)》之銘言:
: write a program that reads in the side of a square and prints that
: square out of asterisks. Your program should work for squares of
: all sides between 1 and 20. For example, if your program reads a
: side of 4, it should print
: ****
: ****
: ****
: ****
: 這是我小考題目,請各位大大幫我解答一下 謝謝^^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.68.184.163