Toggle navigation
Courses
Questions
Tags
Users
AC 20161013 作業 3
0
like
0
dislike
6.5k
views
請設計一個程式,利用迴圈輸出文字金字塔。
p.s. 輸入皆為奇數,且不大於20
範例輸入1:
5
範例輸出1:
*
***
*****
輸入範例2:
7
輸出範例2:
*
***
*****
*******
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13736 -
Available when:
Unlimited
-
Due to:
Unlimited
1
flag
|
6.5k
views
comment
0
0
Called for Help
0
0
Called for Help
0
0
Called for Help
0
0
Called for Help
0
0
Called for Help
Please
log in
or
register
to add a comment.
61
Answers
0
like
0
dislike
Hidden content!#include <stdio.h>
#include<stdlib.h>
int main()
{
int input,b,c ;
* * ** * ** * * * * ** ******* *** * * * * ** ** ****
for(b=0;b<=input;b++)
{
* * * * * ** * ***** ** * * * ** ** ** * * * *** * * ** *
****** **** ** * ** ** * *** **** * * * * * *** *** * ** ** * ** *** **** * * * * * ");}
* * * *** * ** * *** * ** ** * * ** * ** * * * ** * * * * * ** **** ** * * * ** * * ** ** * * ** * *
* * * * * * * * * * * * * ** * * * * * * * * ** * * * * ** ** * * * ** * ** * * * * * * * * * * *
* * * * ** * * * * ** * ** ** * * * * * ** * * ** * * * ** * * ** ** * * ** * ** ** ** * ** ** ** * *
* *** * * * ** * * * ** ** * * * * * ** *** ***** ** * * ** * * ** * * *** * * * * * * * **** * * * ** ** * * * **** * * * **
** *** ** ** * ** * * ** * * ** * *** * * **** *** * * * ** * * * * *** ** ** * * **
*** ** *** * ** * ** *** * ** ** * * * **** * * * * * * * * * * * * * * **
* **** * * * * * * * * * ** ** ** ** ** 0;
}
answered
Oct 22, 2016
by
林佳慧
(
-85
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!#include<stdio.h>
* ** **** * * ***
int main()
{
* * * * * * * * * * n, j, k;
* ** * * * ** * * ** * ** ** * * &n);
** * * * * * * * * * (j = 1; j <= n / 2 + 1; j ++)
** ** * * * * * * ** *
* * * ** * *** * * * *** * *** * ** * ** * ** * ** * ** = 0; k < n / 2 + 1 - j; k ++)
* ** ** * * * * * ** ** * * ** * * ***** * ** * * * ** * * * * * * ** * * * ** * ** * * * ** ** ");