1 like 0 dislike

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

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

92 Answers

0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
** ** ** * ** * ** ****** * n,i,j;

*** * ** * * ** ** *** *** ** *** the number");
** *** ** *** * * * ****** * * * * ** *

* ** * ** * * ** * ** ** ******* ***
    {
** * * ** ** * * * * **** *** * *** * *** *** ***
* * * ** * * * **** ****** * **** * *** ****** **** ***
** **** * ** * * * ** * ** * * * ***** * * *** *
** **** * * **** **
*** ** ** ** ** *** *** **** 0;
}
answered by (-153 points)
0 like 0 dislike
Hidden content!
#include ** * * * ** **
int main()
{
* * ** ** **** i, j;
* ** * * * (i=1;i<=5;i++)
  
* *** *** ** *
* * ** * *** * (i!=1) * ** ** *** *
* ** ** * ** * ****** ***** * ** ** * *** * (j=0;j<i;j++)
* *** * * * * **** * * ****** * * ** ** ** * * * ** * *
* * ** ****** * * * * * ******* * ** ** *** ** ** * ** ***** * * * * * ** * ** * **** * * **** * * * * * ** * *
* * ******* * *** ** * ** * ** *** ** * ** *
*** *** **
  
 return 0;
}
answered by (-249 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include ** **** * **
int main()
{
* * *** i, j;
* * * ** * * * * * * * **
* * * *
**** * * ** *
** **       for * ** * * *
*** *** ** * ***** ** * * ** * *** ***
*** * **** *** ** ** * ** * * **** * * ******** * * * *** * ** *       * ** ** * * *
* ** ** * **** **** * * * ** * **** ** *
* ** * * *
* * **
**** * 0;
}
answered by (-249 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
** * ****** ***** * * ** * * * *** **** *** ** ** *
* ***** * * * **** *** * **** ****** ** *
* * ** **** * ** * ** **** * ** * * *
* * **** ** * *** * * ** ** ** ****** ******
*** * ** * ***** * ** * * ** *** * **
** * * **** ** * * **** 0;
}
answered by (90 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
* * * **** **
int main()
{
**** *** *** *** * * *** ** *
* * * * * * **** **** ** *
* * * ** * ** * *** * *****
**** * * * * * ** * * * ** ** *
* ****** ** **** *** * * *** **
  return 0;
}
answered by (90 points)
0 0
prog.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include<stdio.h>
        ^
0 like 0 dislike
Hidden content!
*** * ** ** **
int main()
{
**** ** *** * ** * * *** **
* * ** * * **** * *** *
* ** * ** * **** ** **
* * * * * **** ** ** *
* ** ***** * * * * * ***** * * **
  return 0;
}
answered by (90 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
**** ** ** * * *
int main()
{
***** ** ** * ** * * * * *** * **** ** ** *
return 0;
}
answered by (90 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
** ** ** * * *
int main()
{
* ** **** **** * ** *** * ***** * *** *** ** *** *
return 0;
}
answered by (90 points)
0 0
Case 0: Wrong output
0 like 0 dislike
Hidden content!
#include<stdio.h>

int main()
{
*** * * ** ** ** ** * *** **** * * *
******* ** ** ** * ** *** * * ** *
******** **** *** ** * *** * ** ** ** **** *
*** *** * * * * * * ** **** * **
** * * * * * * *** * ** * * ** * * **

* * **** ** **** * * 0;
}
answered by (82 points)
0 0
Case 0: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main ()
{
** * *** ** * * *** ***
* * ****** * **** * ** *
**** ** * ** **** ** ******* *
** ** * **** * ****** * **
* * * * *** * * *
}
answered by (-153 points)
0 0
Case 0: Wrong output
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.78.100
©2016-2019

Related questions

1 like 1 dislike
92 answers
[Exercise] Coding (C) - asked Sep 21, 2017 in Chapter 1: Introducing C by thopd (11.3k points)
Available when: Unlimited - Due to: Unlimited
| 215 views
0 like 0 dislike
0 answers
[Resource] asked Oct 14, 2017 in Chapter 1: Introducing C by thopd (11.3k points)
Available when: Unlimited - Due to: Unlimited
| 13 views
8,728 questions
70,470 answers
45,279 comments
1,844 users