All pastes #590566 Raw Edit

Unnamed

public text v1 · immutable
#590566 ·published 2007-06-26 17:26 UTC
rendered paste body
#include <stdio.h>
#include <graphics.h>
#include <conio.h>

int main () {
	int grd = DETECT, grm;
	int x = 0, maxx, maxy, cx, cy;
	initgraph(&grd, &grm, "C:\\BORLANDC\\BGI");
	maxx = getmaxx() + 1;
	maxy = getmaxy() + 1;
	cy = maxy / 2;
	setcolor(WHITE);
	moveto(x, cy+25);
	lineto(x+25, cy+50);
	lineto(x+75, cy+50);
	lineto(x+100, cy+25);
	lineto(x, cy+25);
	moveto(x+50, cy+25);
	lineto(x+50, cy-50);
	lineto(x+75, cy+15);
	lineto(x+50, cy+15);
	setfillstyle(SOLID_FILL, BLUE);
	bar(0, cy+37, maxx, maxy);
	getch();
	for ( ; !kbhit(); ) {
		setcolor(BLACK);
		moveto(x, cy+25);
		lineto(x+25, cy+50);
		lineto(x+75, cy+50);
		lineto(x+100, cy+25);
		lineto(x, cy+25);
		moveto(x+50, cy+25);
		lineto(x+50, cy-50);
		lineto(x+75, cy+15);
		lineto(x+50, cy+15);
		x ++;
		setcolor(WHITE);
		moveto(x, cy+25);
		lineto(x+25, cy+50);
		lineto(x+75, cy+50);
		lineto(x+100, cy+25);
		lineto(x, cy+25);
		moveto(x+50, cy+25);
		lineto(x+50, cy-50);
		lineto(x+75, cy+15);
		lineto(x+50, cy+15);
		setfillstyle(SOLID_FILL, BLUE);
		bar(0, cy+37, maxx, maxy);
		if (x == maxx - 100) break;
	}
	getch();
	closegraph();
	return 0;
}