A techno savvy blog focusing on the computer, network and internetworking contents for technical students. Articles in this blog focus on ccomputer and networking concepts, stuffs, and covers a wide range of topics like network, security, cloud and web
Wednesday, August 30, 2017
Monday, August 28, 2017
Sunday, August 6, 2017
c program for National Flag of India
//C graphics program for National Flag of India with output pdf download
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int gd=DETECT,gm,i;
initgraph(&gd,&gm,"");
for(i=0;i<getmaxy()/3;i++)
{
setcolor(4);
line(0,i,getmaxx(),i);
}
for(i=getmaxy()/3;i<getmaxy()*2/3;i++)
{
setcolor(15);
line(0,i,getmaxx(),i);
}
for(i=getmaxy()*2/3;i<=getmaxy();i++)
{
setcolor(GREEN);
line(0,i,getmaxx(),i);
}
setcolor(BLUE);
for(i=0;i<360;i+=15)
pieslice(getmaxx()/2, getmaxy()/2, i,i+15, 80);
getch();
closegraph();
}
Subscribe to:
Posts (Atom)