Binary: HEART Program
From Scott Kahler <sco...@lamar.ColoState.EDU>
· rec.arts.ascii
· 29 Oct 1994 01:01 · View full thread
· report
Here is a heart generator program for all of you love-
birds out there. Just save the file, remove these
lines of text, and then compile using something like
'cc heart.c' or whatever. Enjoy!!
_______________________________________________
/___...@Lamar.Colostate.EDU________ | |
| ________________________________________ /| | \ /
| | | Maybe in order to understand mankind,| | | | _,adbba,_ |
| | | we have to look at the word itself:| | | =+= ,d888888888b, =+=
| | | "Mankind". Basically, it's made up of| | | | d88888888888b |
| | | two separate words -"mank" and "ind".| | | Jesus-------------Christ
| | | What do these words mean ? It's a| | | -----the risen Son------
| | | mystery, and that's why so is| | | "I am the light of the
| | | mankind. -Jack Handey | | | world: he that followeth me
| | |______________________________________|_| | shall not walk in darkness,
| |/_____________________________________________| but shall have the light of
|________________________________________________/ life" - John 8:12
/*************Remove aboove this line******************/
/******************************************************/
/******************************************************/
/******************************************************/
/* heart.c written by Paal D. Ekran. (C)94 ESD, Amiga. */
#include "stdio.h"
#include "strings.h"
#include "stdlib.h"
FILE *fp;
int scnt,scale;
char str[512],fname[20]; /* longer str makes it possible to write all over the heart */
void prtch(void);
void prtspc(void);
void main(void){
int a[21],b[21];
int cnt,li,scl,foo;
char scales[4];
for (cnt=0;cnt<20;cnt++) a[cnt]=1;
a[1]=9; b[1]=20; a[2]=6; b[2]=24; a[3]=4; b[3]=27; a[4]=3; b[4]=28; a[5]=2;
b[5]=29; b[6]=29; b[7]=29; b[8]=28; b[9]=28; b[10]=26; b[11]=24; b[12]=22;
b[13]=20; b[14]=18; b[15]=16; b[16]=14; b[17]=11; b[18]=7; b[19]=2;
printf("Heart v1.4 \n\n");
printf("text: ");
gets(str);
printf("file: ");
gets(fname);
scale=0;
while (scale<1 || scale>3) {
printf("scale [1-3]: ");
gets(scales);
scale=atoi(scales);
}
if ((fp=fopen(fname,"w"))==NULL) {
printf("could not open file.\n");
exit(0);
}
printf("\n\n");
li=1; scnt=0;
for (li=1; li<=19; li++) {
for (scl=0; scl<scale; scl++) {
for (cnt=0; cnt<30-b[li]; cnt++) prtspc();
for (cnt=0; cnt<b[li]-a[li]; cnt++) prtch();
foo=a[li]+a[li];
while (foo>2) {foo--; prtspc(); }
for (cnt=0; cnt<b[li]-a[li]; cnt++) prtch();
printf("\n");
fprintf(fp,"\n");
}
}
if (fclose(fp)) printf("file close error.");
}
void prtch(void){ /* prints next char both to stream and screen */
int no;
for (no=0; no<scale; no++) {
printf("%c",str[scnt]);
fprintf(fp,"%c",str[scnt]);
scnt++;
if (str[scnt]==*"\0") scnt=0;
}
}
void prtspc(void){ /* prints next space both to stream and screen */
int no;
for (no=0; no<scale; no++) {
printf(" ");
fprintf(fp," ");
}
}
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fbb9d,db937b48e4d5f66c,start X-Google-Attributes: gidfbb9d,public X-Google-ArrivalTime: 1994-10-28 18:12:12 PST Path: bga.com!news.sprintlink.net!sashimi.wwa.com!not-for-mail From: sco...@lamar.ColoState.EDU (Scott Kahler) Newsgroups: rec.arts.ascii Subject: Binary: HEART Program Date: 28 Oct 1994 20:01:24 -0500 Organization: Colorado State University, Fort Collins, CO 80523 Lines: 102 Sender: bob...@wwa.com Approved: bob...@wwa.com Message-ID: <38s6t4$94...@gagme.wwa.com> NNTP-Posting-Host: gagme.wwa.com
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
//O\\
|\/\/\/| | | | | | (o)(o) C _) | ,___| | / /____\
|HHHHH/"\"\HHHHHHH| |HH`\|_.-)'|/'dP,H| |Hb.`\\_/_//'.oddH| |HHHb|`.\/\,'|HHHH| |HHHHHb/\/\/|HHHHH| |"""""""""""""""""| | |"" /\ \ / |"" | | |__/--\ \/ __| |
_________
/___ ___\
//@@@\ /@@@\\
\\@@@/ \@@@//
\___ " ___/
| - |
\_/ jrjc ______
/|_||_\`.__
( _ _ _\
=`-(_)--(_)-'
hjw .="=. _/.-.-.\_ ( ( o o ) ) |/ " \| \'---'/jgs /`"""`\\
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
rec.arts.ascii
in 1994 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.