Toggle navigation
Courses
Questions
Tags
Users
AD 20161013 作業 3
0
like
0
dislike
3.3k
views
請設計一個程式,利用迴圈輸出文字金字塔。
p.s. 輸入皆為奇數,且不大於20
範例輸入1:
5
範例輸出1:
*
***
*****
輸入範例2:
7
輸出範例2:
*
***
*****
*******
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13501 -
Available when:
Unlimited
-
Due to:
Unlimited
|
3.3k
views
comment
0
0
Called for Help
0
0
Called for Help
Please
log in
or
register
to add a comment.
45
Answers
0
like
0
dislike
Hidden content!
*** **** * * * * ***
*** *** ****** *
int main()
{
*** * **** ** ** * ** a,i,j,k;
* ***** ** *** * * * **
* **** * ***** * * *** * **** ** *
****** *** * * = 1;i <= a;i += 2)
* * ** ** * * **
* ****** * * *** *** * * = 0;k <= (a-i)/2;k++)
****** * ** **** **** * * * * * ");
* ** ********* ** ****
* * * = 0;j < i;j++)
** ******* ** **** ** * ***** *** * *
****** *** * ** *
*** * ** ** ** ** ** ** * ** * * *
* * * ** *** ** * ** ** *
** ** * **** *** ** * ** ** * *** *** *
** ** * * ** ** * **** *** * 0;
}
answered
Oct 13, 2016
by
謝秉弘
(
-264
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()
{
*** **** * ** a,i,j,k;
* * * * * **
* *** * * * * * ** ** **** * ** * * ** * *
* *** * * * * ** * ** *
** * * * ** *
* ** * * ***** ** * *
** * ** * ******* * ** * ");
* ** * *** * * * ** ** * ***
* *** * *** * *** ** * * * * * * *
***** * * * ** *** **
**** **** * * * ***** ******
**** * * * *
******* * * ** ** *** ** * *** ** ** * *
* * ** * ********* ** * ** 0;
}
answered
Oct 13, 2016
by
謝秉弘
(
-264
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * ** ** *
#include * * * **
int main(int argc, char *argv[]){
** ** * ** * *** * ** * * i , j , n , input = 0;
*** * *** ** *** * * ** ***** *** ** *****
** *** ** * *** *** **
* **** ****** ** ** *** * = 1; i <= input ; i += 2){
** ** **** **** *** * *** * ** ** ** = 1;n <= ((input-i) / 2) ;n++)
** * ** * ** ** ** * * **** * * ** **** * * * * ** ***
* *** * ** * * * *** * **** = 1 ; j <= i; j++)
* * ** * * **** ** **** * * ** *** * * * * * * *** * * ** *
* * * *** * * * * ** * * * ** ** ** **** ** * **
* ***** * ****** ** *** **
***** ** ** **
* * **** *** * ** *
** * * ***** *** * 0;
}
answered
Oct 13, 2016
by
Dhgir.Abien
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include *** *** * *
#include ****** *** ** ***
int main(int argc, char *argv[]){
**** * * ** * * * * i , j , input = 0;
* * ******* * ** ** * ******* * *** * ** * ** * **** *
** *** **** * *
* * ***** *** * * ** * = 1; i <= input ; i += 2){
* ****** * ** ** * *** * * ** *** * = 1 ; j <= i; j++)
*** * ***** ***** **** * * * *** * * * * **** * * ***** * **
* **** * ** ******* * ***** ** * * ** *** * *
*** * *** * **** * *
**
* ** * * **** **
* * * ** 0;
}
answered
Oct 13, 2016
by
Dhgir.Abien
(
-216
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()
{
*** * * * *** *** * * a, j, k;
* * *** * ** **** * * *** * * * ** ***** * ** * *
* ** *** * ** * ** **** * = 1;j <= a / 2 + 1;j ++)
**** ****** * *** ***
****** * * * * ** * *** * * *** * ** * * **** ** = 0;k < a / 2 - j + 1;k ++)
*** * * * * **** **** **** * * * ** * * ***** * * * ** ** * * ** * ");
* **** ** * * * * **** ** * * * * ** *** * ** = 0;k < (j - 1) * 2 + 1;k ++)
* * ** ** ** * ******* *** * ***** * ** *** * *** * * *********** *** ******
***** ** * * *** **** ******* * * * * * * * ** * * ** **
****** ** *** * *
}
answered
Oct 13, 2016
by
Shun-Po
(
18k
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
3
4
5
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.71.254.250
©2016-2025
Related questions
0
like
0
dislike
23
answers
AD 20161013 作業 4
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13528 -
Available when:
Unlimited
-
Due to:
Unlimited
|
1.9k
views
0
like
0
dislike
67
answers
AD 20161013 作業 1
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13427 -
Available when:
Unlimited
-
Due to:
Unlimited
|
4.1k
views
0
like
0
dislike
40
answers
AD 20160929 作業 3
[Exercise]
Coding (C)
-
asked
Sep 29, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 11795 -
Available when:
Unlimited
-
Due to:
Unlimited
|
3k
views
0
like
0
dislike
60
answers
AD 20161013 作業 2
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
2016-1 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 13428 -
Available when:
Unlimited
-
Due to:
Unlimited
|
3.8k
views
0
like
0
dislike
31
answers
AD 20161103 作業2
[Exercise]
Essay (Open question)
-
asked
Nov 3, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 16958 -
Available when:
Unlimited
-
Due to:
Unlimited
|
2.4k
views
12,783
questions
183,442
answers
172,219
comments
4,824
users