[ create a new paste ] login | about

Link: http://codepad.org/LD3ZpwfS    [ raw code | output | fork ]

C, pasted on Dec 14:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#define NUM (5)
int main(void) {
    int x,y;
    for (y=0;y<NUM;y++) {
        for (x=0;x<NUM;x++) {
            if (x==0 || y==0 || x==NUM-1 || y==NUM-1)   putchar('#');
            else                                        putchar(' ');
        }
        putchar('\n');
    }
    return 0;
}


Output:
1
2
3
4
5
#####
#   #
#   #
#   #
#####


Create a new paste based on this one


Comments: