Skip to content

Instantly share code, notes, and snippets.

@kuldipem
Created July 21, 2015 14:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuldipem/8392eb3031c036c01b71 to your computer and use it in GitHub Desktop.
Save kuldipem/8392eb3031c036c01b71 to your computer and use it in GitHub Desktop.
Want to impress your girlfriend/boyfriend by your coding skill ?
/*
* File: main.c
* Author: KULDIP PIPALIYA <kuldipem@gmail.com>
*
* Created on 17 July, 2015, 10:17 AM
*/
#include <stdio.h>
#include <stdlib.h>
#define HEIGHT 5
#define WIDTH 55
/*
*
*/
int main(int argc, char** argv) {
int i = 0, j = 0;
int pattern[HEIGHT][WIDTH] = {
/*I=============space=======L===========SPACE=O=============SPACE==V==============SPACE==E=========SPACE========Y=============SPACE=O===========SPACE==U*/
{1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1},
{1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0},
};
for (i = 0; i < HEIGHT; i++) {
for (j = 0; j < WIDTH; j++) {
if (pattern[i][j] == 1) {
printf("#");
} else {
printf(" ");
}
}
printf("\n");
}
return (EXIT_SUCCESS);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment