0 like 3 dislike
5.3k views

Print this pattern

Input

5

Output

    1
   121
  12321
 1234321
123454321

Input

8

Output

       1
      121
     12321
    1234321
   123454321
  12345654321
 1234567654321
123456787654321

 

[Exam] asked in Midterm by (12.1k points)
ID: 32710 - Available when: 2017-11-15 14:10 - Due to: Unlimited
| 5.3k views

58 Answers

0 like 0 dislike
Hidden content!
#include <stdio.h>

int main(void)

{
**** ** * * * * *** num,cpt,c,b,i,m;
* * * ** * * * * * * *** ** * ** * * * *** * * * *
*** **** *** * * *** * *****
** * ***** *** *** * * ** * ** *

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

    {
* * * * *** * * * * * * ** *** * *** * * *** ** ");
*** *** * * * ** * ** * ** ** * * *** ** ** ** **
** * * ** ** * * * * *
* * ** ** * * * **

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

    {
* * * ****** * * ** * * * * **
*** * * ** ****** ****** * ***
* * *** *** * **
* * * ***** * ** *** ***
* ** *** ** ** * (cpt==num)
** * * * ************
* * ** **** ** * * ** **** ** * * *** * **** * * ***** **
* * *** ** * * * * * * ** **** * *
*** * *** * * ** * * * ** * ***** * ** * *** *** ** * * ** * *** *****
**** * *** *** * *** * * ** * * *** * ***

    }



}

 return 0;

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

int main ()
{
*** * *** ** ****** *** lol,a,b,my,c;
****** ** ** * * ** *** ** ****** * * ** ** *
* * * ** *** **** ** *** * * a<=lol; a++)
    {
*** * *** * * *** ** *** * *** * ** * * * (my=0; my<lol-a; my++)
*** * *** *** ** * * * * * ** * ** ** * *** * * * * **** *** * * * **** ");

** ** * ** ** *** (b=1; b<a; b++)
** * ****** * ***
** * ******* ***** * *** ** * ** * * * *** ** ** ***** * * *


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

int rows,i,ii,iii,my;

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

for(i=1; i<=rows; i++)
******* ** ** * ** *
**** ********* ** **** ** * * my<=rows-i; my++)

** ** **** * ** * * * **** ** * ****** * *** **** * ");

* * * ** * ********* * * *** ii<i; ii++)
** *** ****** ** * **
* * * ** *** ** ** *** * **** ** ** * ** ** * * ** * * * **
***** * * *** ** ***
** **** ** ***** * ** iii>=1; iii--)
* ** *** * * * * * * ** *
******* * * * **** * * * **** * ***** * ** * ** *** **
* ********* ** ** * * **
* * * ** * * ** *** ** * (i<rows)
* ** * ** * * * ** * * **
* * * * ****** ** * *** ** * * * **** * ** *
*** * * ** *********
**** * **** ** ** * *

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

int rows,i,ii,iii,my;

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

for(i=1; i<=rows; i++)
** * *** * * * * ** *** *
* *** * *** *** * * ** ** *** my<=rows-i; my++)

*** * *** ** * ** ***** * **** ********* * ");

* * ** **** * * ** **** *** * ii<i; ii++)
** * * * *** **** * ***** *
* *** ****** * * ******* **** * ***** ** ** * ** * ** * **
**** ** * * *** * **
** * ** *** ******* iii>=1; iii--)
* *** *** ** *** * * * * **
** * *** ** * * **** * ** *** ** **** * * **** * ** ******* * *
* * * * ** ** ***
** * * ****** * (i<rows)
* *** ** *** ** * **
* * * ****** * * * * ** * ** **** *** * * **** * ***** * **
** * * **** ** *
* * ** *** ** **

return 0;
}
answered by (-254 points)
0 0
prog.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main()
 ^~~~
0 like 0 dislike
Hidden content!
#include * **** *



int main(void)
{


** * * * ******* * ***** x,y,z,j;

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

for(j=1; j<=x; j++)
* * ** * ******* ** **** **
** **** * ** * ** **** * * * * y++)

* * * * **** ** * ** ******* ** * * ***
}
* * * * ***** ** ** *** z<j; z++){

* * * *** * ** ** * *** * * * * *** * *********
* ** *** * * ** * *
* **** ** ** *** * * * *** * ** j>=1; j--){

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

return 0;


}
answered by (-107 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
* *** * **** ** * ** space,a,b,c;
** ***** *** ** ***** * ** ** ** ** * * * *
* * * ** ****** * ** (a==5)
    {
*** *** *** * * * ** * *** ** * ** * *** * * * * * *** *** * * * ** ** ** * * **
** * * * ** ** * ** ** ** * ** *** * * **   121\n");
* * ** *** * * *** * * * * **** ** *** ***** *** * *  12321\n");
* ***** * *** * ** *** * ******** * *** **** 1234321\n");
*** ** * * * *** * ** *** ******* * ** * *** * *** * ******** ** *
    }
** ** **** * * * * * *
    {
** * ** ** ** * ********** ** ** * *** * *** **** ** * ** *** * ** ******** *** ** * ** *
* * * * ** **** * ** ** * ** * ** * * * * * * *** *** * ** *** ** * *** * * * * *
** ** * *** * * *** * * * ** **** *** ** **** *** * * * *** * * * * * ** * * *
** * ** ** * ** * ** ** ** * * ** * * ********* * * * * ******** ** **** ** *
* * * * * ** *** * ** * ** **** ** ** ****** * ******* *** * ***
* ** * ** * *** * * ** * * *** * ** ** * * * * ** *** **  12345654321\n");
**** * * * ** *** * * * ** * * * * * *** * * ** ** * 1234567654321\n");
* ** ** * ** **** ** ** ** *** * * * ***** ** ** * ** * * * * *** *
    }

}
answered
0 0
Case 0: Correct output
Case 1: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
*** *** *** * *** * ** * * space,a,b,c;
** *** ** * * ** * ** * * *** ** * **** * * *
* *** ** * * * *** * * (a==5)
    {
* * ** * ***** ** * ****** *** * * ** ** * * ** ** ** * ** ** ** * ** * * * ** * **
* ** ** * * ** ** ** * * * * * * ** * **** *   121\n");
**** * *** ** *** ** * * **** ** ** * **** ***  12321\n");
** * ***** * * * * ** ** *** ** ****** ** 1234321\n");
** * * * * * ** ** * * ** * * ** * * *** * ** * * ** * *******
    }
**** ** ** * * *******
    {
** * * ** * * ** *** * * * *** * * ** *** ** * ** ** * ** * **** ** ** * ** **
* ** *** *** **** ** * * *** * * ****** * *** * ** *** **** ***** * * * *** * * **** * * * *
* ** ** ***** * * * ** ****** * * ** ***** ** * * *** ** **** *** ** **** ***
****** *** * * * *** * * *** **** **** **** *** * *** * ** ** *** * *** **
* * * * * * ***** *** * ** * * * * ***** ** ** * * * ***** ******** **
* *** * **** * * * * *** ** * ** **** * ** ** **  12345654321\n");
* * * * * ***** ** ** * ** *** ** * ** * **** ** ** 1234567654321\n");
*** * * ** ** *** * ** *** *** * * * ******** * * **** * ** * ** * ** *
    }

}
answered
0 0
Case 0: Correct output
Case 1: Wrong output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int rows,i,ii,iii,my;
int main()
{


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

for(i=1; i<=rows; i++)
* *** ** ** * * * * *** ***
* ** ** ** **** * my<=rows-i; my++)

******** * * * * **** ** * * * *** ** ** ***** * * ");

* * * * **** ** ** *** * * * ii<i; ii++)
* * * ** ** ***** * * ***
* ** ** ****** ** * **** *** * * *** * **** *** ** * *
**** * * ** * ** *
** ** **** ** *** * * iii>=1; iii--)
* * * * ** ** ** ****
*** *** ** ** * * *** * * ** * ** ** * * ** ** * *****
** * * ***** ** * * * ** **
** * ** ** * * ** * ** ** (i<rows)
* ** *** * *** ** *
* * ****** ** ** * ******** * * * ***** ** * * ** * * *
** **** *** *** ** * * **
* * * *** ** *** * **

return 0;
}
answered by (-254 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int rows,i,ii,iii,my;
int main()
{


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

for(i=1; i<=rows; i++)
* * ***** ** * ** * *
* ***** * * * ** ** * *** * my<=rows-i; my++)

* * ** * *** ** * ** *** *** * * ** *** * ***** ");

* ** * **** * ** * ** ii<i; ii++)
* ** * ** * * ** *
** * * * * ** *** **** * * ** ** * ** **** * ***** * * * * *
**** * * ****
* * * ****** * * ** ** iii>=1; iii--)
* ********* * * ** * * **
* * ***** **** * * ** * * **** * ** *** ** ** * * * *
* * * * * * * * *
* **** ** ****** ** *** (i<rows)
*** * * ** ** *
** ** *** * ***** *** ** ** * * ** ** *** ** ******* *
** * * * * ***** *
* * ** ** * * * *** *

return 0;
}
answered by (-254 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 like 0 dislike
Hidden content!
#include<stdio.h>
 int main()
{

int rows,i,ii,iii,my;

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

for(i=1; i<=rows; i++)
*** * * * * ** *
** ** * ** * ** *** *** * my<=rows-i; my++)

******* * ** * * * ** * **** * ** **** * ** * * ");

** * * * * ** * * * * ii<i; ii++)
*** * * * ** ******
*** ** * * ***** ** ** ***** *** **** ** * * ** * * ** *** ** ****
* ** * *** * * ** *** * *
* * **** ** * ** ***** iii>=1; iii--)
* * * * **** * ** ** * *
*** ****** * * ** ** *** ** * * * ******* ***** **** **
* * * ** ** * ** *** *
**** * ** *** * ** (i<rows)
****** *** *** * ** * ** *
* * * **** ********* ******* ****** * * * ** * * **
** ** * ** ** *
* ** ** ** * *

return 0;
}
answered by (-254 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:108.162.216.93
©2016-2025

Related questions

0 like 0 dislike
15 answers
[Exam] asked Dec 9, 2017 in Midterm by thopd (12.1k points)
ID: 36755 - Available when: 2017-11-15 14:10 - Due to: Unlimited
| 2.2k views
0 like 0 dislike
19 answers
[Exam] asked Dec 9, 2017 in Midterm by thopd (12.1k points)
ID: 36750 - Available when: 2017-11-15 14:10 - Due to: Unlimited
| 2.3k views
1 like 1 dislike
59 answers
[Exam] asked Nov 15, 2017 in Midterm by thopd (12.1k points)
ID: 32351 - Available when: 2017-11-15 14:10 - Due to: Unlimited
| 5.7k views
12,783 questions
183,443 answers
172,219 comments
4,824 users