1807 - Arrowhead matrix   

Description

[ps2_2]

輸入介於 2 20 的整數代表矩陣大小
輸出對應大小的 Arrowhead matrix
http://en.wikipedia.org/wiki/Arrowhead_matrix

例如
輸入:
5

輸出:
 * * * * *
 * * 0 0 0
 * 0 * 0 0
 * 0 0 * 0
 * 0 0 0 *

底下是樣本程式


/*
ps2_2.c
Arrowhead matrix
http://en.wikipedia.org/wiki/Arrowhead_matrix

Input:
3

Output:
 * * *
 * * 0
 * 0 *

*/
#include 
int main(void)
{
    int n;
    int i, j;
    scanf("%d", &n);

    /* your code */

    return 0;
}

Input

參照題目敘述

Output

參照題目敘述

Sample Input  Download

Sample Output  Download

Tags




Discuss