Skip to content

Instantly share code, notes, and snippets.

@Codeplaza
Created November 30, 2013 08:19
Show Gist options
  • Select an option

  • Save Codeplaza/7716628 to your computer and use it in GitHub Desktop.

Select an option

Save Codeplaza/7716628 to your computer and use it in GitHub Desktop.
Rainbow
//RAINBOW IN C++
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int gdriver = DETECT,gmode;
int x,y,i;
initgraph(&gdriver,&gmode,"D:\\TC\\BGI");
x=getmaxx()/2;
y=getmaxy()/2;
for(i=40;i<200;i++)
{
delay(100);//forth colour pattern strip
setcolor(i/10);
arc(x,y,0,180,i-10);
}
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment