1 like 0 dislike
14.5k 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
| 14.5k views

92 Answers

0 like 0 dislike
Hidden content!
#include * ** ** *** **

int main( void )
{ * ** ** ** * ** "*\n" );
***** * * * * *** * * * * * * * * * ** ** );
* * * ******* * * * * **** * *** ** * **** ** * );
* * * ** **** ** ** ** * **** * );
* *** * * * * *** ** * ** *** ** ** );

* * ** * * ** * * *** 0;
}
answered by (64 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include <iostream>

int main()
{
**** **** *** * * i;
** ***** * ***** j;

*** * * * * * * **** * *
   {

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

}
answered
0 0
prog.c:1:20: fatal error: iostream: No such file or directory
 #include <iostream>
                    ^
compilation terminated.
0 like 0 dislike
Hidden content!
#include <stdio.h>

int main(void)

{

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

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

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

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

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

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



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

int main(void)

{
* * * * *** **** *** *** * *
** **** * ** ***** *** * ** * *** *
** ** ***** * ** * * *** * **** * **
* ****** * ** * * ** * * * * ****** * *
** ** *** * **** ** *** **** * *** * *
* * * * * * ** * ** 0;



}
answered by (-168 points)
0 like 0 dislike
Hidden content!
#include * *** * ***



int main(void)

{
* *** * ** *** ** * * * * * ** * * * ** * **** ***
* * * * * *** * ** **** * 0;

}
answered by (-323 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

int main(void)

{
* *** ***** * ** ** ****** * ** * * *
** *** * * * * * **** * * ******** * * * ****
** **** ** ** ******** ** ** * ** * *
* * ***** * * * * * ** * * *** * *
*** **** ***** *** * **** *** ** ** * * *** *


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

}
answered by (-249 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

int main ()

{
** ** *** * * *
* * * **** *** * * *
* * * ** * ** *** ***
* * ** ** *** *** ** * **
**** ** * * * * ** *** *

}
answered by (-167 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>



int main(void)

{
** * * ** ** * ***** * * *
* ****** ** * ** * ** *** * * ** ** ** ****
***** * *** * * * ** * * *** ** ****
** * ** * ***** *** * *** ** * * ** **
****** * * ** * * ** ** * ***








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

}
answered by (42 points)
0 like 0 dislike
Hidden content!
**** *** ***** **



int main()

{

printf *** **** **
* ** * * * ****

printf * * * * * ***
* ** * * * * * *
*** * *** * ******* *

}
answered by (-140 points)
1 like 0 dislike
Hidden content!
#include<stdio.h>



int main() {
* * **** ***** ****** i;
* * * * ** ** * ****** ** * **** *** {
** * ** * ****** ** *** ***** **** * k=1;k<=i;k++) {
** * ** ******* * * ** ** * * ** *** ****** ** * **** * ** * * * ** ** ** * * * *
* * * * * * ** *** * **** ** * **** * *********
* * ****** * **** ** * ******* ** **
* ** * **** * ** ** *

return 0;

}
answered by (-120 points)
0 0
Great!
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.7.78
©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
| 33.1k 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