0 喜歡 0 不喜歡
5k 瀏覽

Print this pattern

Input

5

Output

    1
   121
  12321
 1234321
123454321

Input

8

Output

       1
      121
     12321
    1234321
   123454321
  12345654321
 1234567654321
123456787654321

 

[考試] 最新提問 分類:Midterm | 用戶: (12.1k 分)
ID: 36755 - 從幾時開始: 2017-11-15 14:10 - 到幾時結束: 無限制
| 5k 瀏覽

15 個回答

0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>

int main(){
* ** * *** * n;
** * * * * * * * * space;
    int i,j,k;

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


* * * * * * * = n-1;
* *** * * ** ** * ** **** *
* **** ***** * *** ** ** ** ** * ** * * * *** ** * * *** ");

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


* ****** ***** *** * *** ** * * ****** **
* * * * ***** ** *** * *** ** ** * ****
    }
* **** ** *** ***** *** * *** 0;
}
最新回答 用戶: (-74 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
int main (){
int n,j,space,i;
printf("enter your line do you want: ");
**** ** ** *** ** * * *

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

}

return 0;
}
最新回答 用戶: (16 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>

int main()
{
** ** * * * * *** * * *** i, num, rows;

* * *** *** ***** * * * ** ** ** ***** * &num);

********* * *** * **** * <= i; rows == 0; i++)
* **** * * * * **
*** * **** **** * ** * *** * ** * * ** * **** ** * *** * * ** * ***** * * *** ***** * *   ");
* * * * * **** *** ** ** ******** * ** * ** ****** * * * * * ** * *  ");
***** ** * ** * ** *** * ** * ***** ** *  %d%d%d%d%d ");
* **** * **** * ** **** * * ** * ** *** * * ** %d%d%d%d%d%d% ");
* * ** * * *** * * ** * * * * * *** ******* * * *
* * * **** * * * * *
*** * ** * * ****
* * ** ** * *** * *** ** *** * ** ** * ** *** num;
********* **** * *

* * ****** * *** **** * ** * 0;
}
最新回答 用戶: (-233 分)
0 0
prog.c: In function 'main':
prog.c:9:16: error: expected ')' before ';' token
     if(num <= i; rows == 0; i++)
                ^
prog.c:11:25: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("       %d   ");
                         ^
prog.c:12:22: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("    %d%d%d  ");
                      ^
prog.c:12:24: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("    %d%d%d  ");
                        ^
prog.c:12:26: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("    %d%d%d  ");
                          ^
prog.c:13:20: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("  %d%d%d%d%d ");
                    ^
prog.c:13:22: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("  %d%d%d%d%d ");
                      ^
prog.c:13:24: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("  %d%d%d%d%d ");
                        ^
prog.c:13:26: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("  %d%d%d%d%d ");
                          ^
prog.c:13:28: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("  %d%d%d%d%d ");
                            ^
prog.c:14:19: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                   ^
prog.c:14:21: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                     ^
prog.c:14:23: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                       ^
prog.c:14:25: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                         ^
prog.c:14:27: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                           ^
prog.c:14:29: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                             ^
prog.c:14:31: warning: conversion lacks type at end of format [-Wformat=]
         printf(" %d%d%d%d%d%d% ");
                               ^
prog.c:15:18: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                  ^
prog.c:15:20: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                    ^
prog.c:15:22: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                      ^
prog.c:15:24: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                        ^
prog.c:15:26: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                          ^
prog.c:15:28: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                            ^
prog.c:15:30: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                              ^
prog.c:15:32: warning: format '%d' expects a matching 'int' argument [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                                ^
prog.c:15:33: warning: spurious trailing '%' in format [-Wformat=]
         printf("%d%d%d%d%d%d%d%d%");
                                 ^
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>

int main(){
    int a,b,c,d,e,f;
** **** ** * * * ********* * *** *** *
    for(b=1;b<a;b++){
** * * * * *** ** * *** *** ***** * ******* ** ** * *
* * * ** * ***** *** ** ** ** **** ** * * ******** ** * ** * * * ** *** * ** * * ");
* * ** ** ** ** ** * *** ** *** * * *** ****
* * * * * * * * ********** ** * * ** * ** * **** *
*** * ** ** * ** **** * * * ****** * ** ******** ** *** *** * **** ** ** ** ** * * * * ** ***
* * * **** *** *** ** * ** * **** * * *
* **** ** * * * * ** * * * *** *** * * * * ** * **
** *** ** ** * ** * **** * *** * * ** *** * **** * ********* * ** *** * * *** * *** ***
** ** * * ** * * ***** * * * *** * * * ** *** * *
** ** * **** *** ** * *** * * * ** * * *** * *
    }


** ** ****** *** ***** **** **** * ** ** * *
* * ***** *** * ** ** ** * ***** ** * ** * ***** *** ** * * ** *
    }
* ** ** * * * ***** *** ***** * ****** * * *
*** ** ** *** *** *** * ** * * * *** **** ** *** **
    }









}
最新回答 用戶: (-32 分)
修改於 用戶:
0 0
prog.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main(){
 ^~~~
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>// program to print triangle pattern
int main()
{
*** * ** ** * ***** a,b,c,d,e;
** * * ** * *** *** *** ** * * *
** * ** * * * * ** * b<=a; b++)
*** ** * * ** ** * *
* ** * * * * * *** * * * *** * ** ** * * * ** c<a-b; c++)

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

** ** ** * * *** * * * * * ** **** * (d=1; d<b; d++)
** ** * * * *** ** * * * * * ** * * * * * *** * * ** * ** ** * d);}

* ****** ******* * * *** **** ** * * (e=b; e>=1; e--)
******** * * ** * *** ****** ** ** * ** *** * * * * e);}
* * *** * **** * * *** *** * *** *** *** * * **** (b!=a)

* ** * * ** * * * ** * ** * ******* ** ** ** * * ******
* * ** * * ** ***** **
return 0;
}
最新回答 用戶: (-107 分)
0 0
Case 0: Correct output
Case 1: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>

int main()
{
    int n,i,j,a;
* ** *** * *** * ***** *** * *** * *******
    for(i=1;i<n;i++)
    {
* * ******* * * ** **** *** ** * ***** * * * * * * j<n; j++)
* ** *** * **** * *** * * **** * * ** *
*** * * ** * * ****** *** ** *** * * * *** * * * * * * *** ***** * ** * * ");
** ** * ** *** * ** * * ** *
** * * ** * ** *** * ** ** * * * ** * * **** (j=1; j<i; j++)
* * * ** ** * * * * * *** * * ** * *
* ** *** ** * ** * ****** * ** ** ** * *** * *** ** ** *** * * * ** * ** ** *** * * **
* * * * ** *** ** * * * **
** ** * ***** ** *** **** ***** **** * ** * ** * *** (j=i; j>=1; j--)
** ** **** *** * * ***** * *** * ** ** *** * ********* * *
** *** ** ***** * ******* ***** * * ** * ** * * *** ** *** **** * * *** * **** * *** ***
* * ** *** * * * **** *** * *** * * **** ******* * *** * * * ** * * **** * * **
    }
for(;i==n;)
    {
*** ** * ********** * **** * * * *** * ******** j<n; j++)
*** ** * *** * * * *** * * * ** * * * *
* * * ************ * * * ** * ** * * **** **** ***** ** *** ** ** *** * **** *** ");
**** ** * ** ** * *** * ** *** ** * ***
* ** * * * **** *** **** ** * *** * * (j=1; j<i; j++)
* ** *** * ** *** * * ** * * ** *
* ** ** **** * ****** * * * *** * * * ** ** ** ** ** ** * * *** * **** * * ** ****
        }
****** * * * ** * ** * * * * * * * * * (j=i; j>=1; j--)
* * * * *** * * ***** * * * ** *** **** * *** ** * ****** * **
* * * **** * * * *** ** * *** * ** * * * * ****** * ** **** * ** ** ** *** * ** * * ** *
* ** * ** * ** * ****** ***** * * * * * ** ** * *** ** *** * *
    return 0;
}}
最新回答 用戶: (-32 分)
修改於 用戶:
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
#include <stdlib.h>

int main()
{
* **** * ***** *********** n,i,j,k,l;
* * *** *** *** ** * ** * ** ** * * * **

* *** ** * * * * ****** * i<=n; i++)
    {
** * * * *** * ** **** * ** *** *** * * * * ***** * j>0; j--)
******* * * *** * * ** ** * * * *** *** * *** * * ** ** *** *** * * ");
* ****** * * * *** ***** * * * * * * k<=i; k++)
*** *** ******* **** ** * * * * *** *** **** ** ****** *** **** ** ******* ** * *** * ** *
**** ***** **** ***** * * ** ** *** **** * l>=1; l--)
** **** * ******** *** * **** * * *** ** * * ** * * * ** * * * * *
** * ***** * * * * *** *** * **** ** * ** * != n)
* *** **** ** * * * * ** ** ** *** * * ** * ** * ** * * ***** * * * ** ** **
    }
*** * * * * **** ** ** * * 0;
}
最新回答 用戶: (-127 分)
0 0
Case 0: Correct output
Case 1: Correct output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
#include <stdlib.h>

int main()
{
* ** * ** * * n,i,j,k,l;
*** ** *** ** *** *** * * * * **** * * * * **

** * * ** *** * *** ** i<=n; i++)
    {
* *** **** * ** ** * ** * **** ** * * ** j>=0; j--)
****** *** ** * * **** ***** ** ***** * * ** ** * * * * * * * * * ** * * * ");
** * **** * **** * ** ** * ** ***** ** * *** **** k<=i; k++)
* ***** * ** ** * *** ** *** * ** * ** ** ** * * **** * * ** * *** * * * **** ***
** * * *** *** * ** **** * ** ***** ****** **** * ***** l>=1; l--)
** * * * * ******* ***** ********* * ** * ** * ** * *** * * ** * *** **** * * * *
*** ** ******* *** * *** * ***** ** * ** * * != n)
***** ** * * **** ** * **** **** ***** * * ** * ** ** **** ** **** *
    }
*** * *** * * * *** * * 0;
}
最新回答 用戶: (-127 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,i,j,space;
**** ** ** * * *** * * * ** *** *
** *** ** * *** * * * * (i=1;i<=a;i++)
    {
* * ** * * * * * ** * * * ** ***** ** * * **** (space=i;space<a;space++)
* * ** ** * * **** * * * * * ** * * * *
* * * * ** * * * **** * ** * *** ** ** * * * ** ***** * * ");
* ** * *** ** ******* **** ** * * * ** * ***** ***
* **** * **** * *** ****** *** ** **** **** * *** (j=i;j<=a;j++)
* * * * * *** * * * **** ** ** * **
* ** * ** * * *** * * ** ***** * * * * ** * ********* ***** * ** **** * * ***
*** * ** * * * * * ** ** *** ** * * ** *
*** ** * * * ** * **** * *** ** ** ** ** * (j=i-1;j>=a;j--)
** ** **** * * ** * * * * * *** ******* ** *
* ** * ***** * ** * ** * * * * *** * * * *** *** * *** * * **** * *** ****
** * **** ** * ** * ** * * *** ** ********
* *** ** ***** * * * ** * **** *** *** (j!=i)
** *** ******* * *** * * ** ***** * * * * ** *** * * * ** **
    }
* **** *** * ** **** * * ***** 0;
}
最新回答 用戶: (-108 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int num;
    int i;
    int j;
    int k;
    int l;

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

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

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

* * * * ** *** ** * * * ** 0;
}
最新回答 用戶: (-193 分)
0 0
Case 0: Correct output
Case 1: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.71.254.169
©2016-2026

相關問題

0 喜歡 3 不喜歡
58 回答
[考試] 最新提問 11月 15, 2017 分類:Midterm | 用戶: thopd (12.1k 分)
ID: 32710 - 從幾時開始: 2017-11-15 14:10 - 到幾時結束: 無限制
| 12.4k 瀏覽
0 喜歡 0 不喜歡
19 回答
[考試] 最新提問 12月 9, 2017 分類:Midterm | 用戶: thopd (12.1k 分)
ID: 36750 - 從幾時開始: 2017-11-15 14:10 - 到幾時結束: 無限制
| 5.6k 瀏覽
1 喜歡 1 不喜歡
59 回答
[考試] 最新提問 11月 15, 2017 分類:Midterm | 用戶: thopd (12.1k 分)
ID: 32351 - 從幾時開始: 2017-11-15 14:10 - 到幾時結束: 無限制
| 13.7k 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶