C Program to Draw Olympics Logo using Graphics
#include<stdio.h> #include<conio.h> #include<graphics.h> void main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\\TC\\BGI"); setbkcolor(WHITE); setcolor(BLUE); circle(200,200,45); setfillstyle(1,BLUE); floodfill(201,201,BLUE); setcolor(WHITE); circle(200,200,40); setfillstyle(1,WHITE); floodfill(201,201,WHITE); setcolor(YELLOW); circle(250,250,45); setfillstyle(1,YELLOW); floodfill(251,251,YELLOW); setcolor(WHITE); circle(250,250,40); setfillstyle(1,WHITE); floodfill(251,251,WHITE); setcolor(DARKGRAY); circle(300,200,45); setfillstyle(1,DARKGRAY); floodfill(301,200,DARKGRAY); setcolor(WHITE); circle(300,200,40); setfillstyle(1,WHITE); floodfill(301,201,WHITE); setcolor(GREEN); circle(350,250,45); setfillstyle(1,GREEN); floodfill(351,251,GREEN); setcolor(WHITE); circle(350,250,40); setfillstyle(1,WHITE); floodfill(351,251,WHITE); setcolor(RED); circle(400,200,45); setfillstyle(1,RED); floodfill(401,201,RED); setcolor(WHITE); circle(401,200,40); setfillstyle(1,WHITE); floodfill(401,201,WHITE); getch(); closegraph(); }
Output: