Demo entry 6762831

.c

   

Submitted by anonymous on Oct 17, 2018 at 14:59
Language: C. Code size: 467 Bytes.

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n, i, j;
   
    printf("input n:");
    scanf("%d", &n);

    int a[n][n];
    for (i=0; i < n; i++)
    {
        for (j=0; j < n; j++)
            scanf("%d", &a[i][j]);
        printf("\n");
    }

    for (i=0; i < n; i++)
    {
        for (j=0; j < n; j++)
            printf("%3d ", a[i][j]);
        printf("\n");
    }

    printf("Hello world!\n");

    return 0;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).