How programmer wish happy new year by programming knowledge ? C program to wish happy new year Hello friends Happy New Year to all of you. And on this occasion of New Year, we have prepared a simple mini project using C programming language. Whose code you can download it by clicking on the download link given below. Download link
Draw and move Airoplane
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
for(int i=0;i<550;i++)
{
rectangle(150+i,100,170+i,130);
ellipse(150+i,115,90,270,127,15);
ellipse(116+i,104,10,170,24,12);
line(120+i,120,70+i,166);
line(90+i,120,60+i,160);
ellipse(77+i,160,180,250,16,8);
line(120+i,93,89+i,62);
line(96+i,101,76+i,62);
line(76+i,63,89+i,63);
line(30+i,80,50+i,110);
line(10+i,85,30+i,120);
line(10+i,85,30+i,80);
rectangle(170+i,110,175+i,120);
if(i%2==0)
{
ellipse(178+i,94,0,360,3,18);
}
else
{
ellipse(178+i,136,0,360,3,18);
}
delay(30);
cleardevice();
}
getch();
closegraph();
}
Comments
Post a Comment