Re: [問題] 一題小考題目

看板TransCSI作者 (小葉子)時間19年前 (2006/10/31 14:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
#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
文章代碼(AID): #15HkTysg (TransCSI)
文章代碼(AID): #15HkTysg (TransCSI)