1 like 0 dislike
13.3k views

Use C program to print out a star-triangle below:

*
**
***
****
*****
[Exercise] Coding (C) - asked in Chapter 1: Introducing C by (12.1k points)
ID: 25286 - Available when: Unlimited - Due to: Unlimited
| 13.3k views

92 Answers

0 like 0 dislike
Hidden content!
#include <stdio.h>
int main ()
{
* * *** * * *** ** *
* * * ** ** * **** * *
* * * * * ** * * *** *
**** **** * * * ****
** ** * * *** ** * *
}
answered by (-167 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>

int main()

{
************ * * *** ** ****** *** * * * *** **
* *** * *** ** * **** ****** **** **
** * * * * * *** ** * ** ****** * * **
** ***** ** * * * * ****** * *** * * *
**** ** * * * ***** *** ****** * * ****
    
******* * * ** *** * ** * 0;
}
answered by (-233 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>

int main()
{
*** ** ** ** **** * * * **** * * *
* ** **** * ** *** * * * **** * *
* ** **** *** * ** * * * ** * **
* * *** * * * * * * * * * ** * ** **
** *** * **** *** **** * ** * ** ** * *** *
    
* ** * * * *** ** *** 0;
}
answered by (-193 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>

int main(void)

{
*** * *** * ** * * * * a,b,c,d,i,k;

** * * ** * ****** * * * * ***

***** * * ** *** *** *
** ** * **** *** ** * * *
** * *** *** * **** ** ******* *
* ** *** **** * *** * ** * ***** *
** ** ** ** *** * * **** * ** *
* *** *** ** ***
* ** * * ** *** *** ** ** *
* * ** *** * ** ** 0 ;


}
answered by (-32 points)
edited by
0 0
Case 0: Correct output
0 0
Case 0: Wrong output
0 0
prog.c:28:1: error: expected identifier or '(' before '}' token
 }
 ^
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
* * ** *** *

int main (){

int * **
***** * * **** number of line star * **** ** *
* **** * *** ** ** * * *
* **** * * ***** **
* **** * * *****
* * ****** ** **

}
* * * * ******

}
** 0;

}
answered by (16 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include ** ** *** **** *
 
int main() {
 
*** ** * ** ** **** ** * ** ****
* ** ***** * * * ** *
* *** * * *********** *** ** * *
* * * * * * ** ** * *
*** **** * **** ** ** *** * * * *
 
* * * ******** *** 0;
}
answered
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>

int main(void)

{
**** ** * ** * * ** * * a,b,c,d,i,k;

** * ** ** * * * * * * **

* *** ***** *** ** * ** ** ** ** **
* *** ****** * * *
* * * * ** **** * ** * *
* * ***** * * * * * ***** * * * *** * **
**** * * ******* * ** * ** * ** * *
* *** **** *** ** **
** ***** ** ** * ** ** *
* * * **** * ** ** * * **** ** 0 ;


}
answered by (-32 points)
edited by
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Wrong output
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
*** ** * * *
int main(){
* * ** * ** * *** * ** * * ** * *** * *
* **** *** *** * * ** *** 0;
}
answered by (-32 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
** **** * **** * * * * * ** *** ******
***** * ** * **** * * * * * ** *** *
* *** *** ** ** * *** * * * ** ** *
** *** * ** ***** * *** ****** * *
* * * * *** * ** ** * ** * * **
}
answered by (-214 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
** * * ** * * **** * * ** ****** ***** * *
* * **** **** * * * * * **** * *
* ** *********** *** ** * * * ** *** ******
* *** *** * ** ** * ** * ** ****** *** *
* * ** *** **** * * ** ** * * ***
}
answered by (-214 points)
0 0
Case 0: Wrong output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.50.26
©2016-2025

Related questions

1 like 1 dislike
93 answers
[Exercise] Coding (C) - asked Sep 21, 2017 in Chapter 1: Introducing C by thopd (12.1k points)
ID: 25287 - Available when: Unlimited - Due to: Unlimited
| 29.6k views
0 like 0 dislike
0 answers
[Resource] asked Oct 14, 2017 in Chapter 1: Introducing C by thopd (12.1k points)
ID: 26946 - Available when: Unlimited - Due to: Unlimited
| 13 views
12,783 questions
183,442 answers
172,219 comments
4,824 users