"BANSAL BUS source code in C language"

output will show to click the:  

http://youtu.be/_24hd2r1fKA
 
 
100%

 

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<math.h>
void main()
{
      int gd=DETECT,gm,i,j,x,y,z=40,c=-200,l=15,h=15,ht=0,m=0,n=0,o,k=1;
      initgraph(&gd,&gm,"c:tcbgi");
      settextstyle(GOTHIC_FONT, HORIZ_DIR, 5);
      setcolor(2);
      outtextxy(50,160,"Animation on Bansal Bus..");
      for(i=0; i<450; i+=4)
      {
  delay(10);
  circle(60+i,220,5);
      }

 

 

 settextstyle(GOTHIC_FONT, HORIZ_DIR, 4);
      outtextxy(21,300,"Now you will show the Presentation");
      sleep(3);
      clearviewport();

 

  settextstyle(GOTHIC_FONT, HORIZ_DIR, 5);
 outtextxy(25,120,"Presentation by Rahul Agrawal");
   for(i=0; i<530; i+=6)
      {
  delay(10);
  rectangle(30+i,180,40+i,190);
      }

 

 settextstyle(GOTHIC_FONT, HORIZ_DIR, 4);
      outtextxy(25,240,"Do you want to take BANSAL Bus????");
      outtextxy(100,300,"YES");
      outtextxy(400,300,"NO");
      sleep(3);

 

     setviewport(0,0,620,440,1);
      outtextxy(300,180,"BHOPAL");
      outtextxy(225,220,"Made by Rahul");
 gotoxy(25,25);
 printf("MP NAGAR");
      delay(10);

 


      outtextxy(225,220,"Made by Rahul");
 outtextxy(300,180,"BHOPAL");
      delay(10);

 

  gotoxy(25,25);
  printf("MP NAGAR");

 

   for(i=0; i<=100; i=i+10,j++)
   {
  if(kbhit())
  break;
  outtextxy(225,220,"Made by Rahul");
  outtextxy(300,180,"BHOPAL");
  gotoxy(25,25);
  printf("MP NAGAR");
  delay(10);
  outtextxy(60+i,350,"1243");
  rectangle(0,0, 620, 420);          // bus
  rectangle(50+i,275,150+i,400);
  rectangle(150+i,350,200+i,400);
  circle(75+i,410,10);
  circle(175+i,410,10);

 

  circle(180,315,15);   // boy
  line(180,330,180,375);
  line(180,375,160, 400);
  line(180,375,200,400);
  line(180,340,200,350);
  line(160,360,180,340);

 

   circle(175,310,1);
   circle(185,310,1);
   circle(180,320,1);
  gotoxy(22,18);
  printf("Puja Prakriti");

 


  circle(230,315,15);         //boy
  line(230,330,230,375);
  line(230,375,230, 400);
  line(230,375,250,400);
  line(230,340,250,350);
  line(210,360,230,340);

 

   circle(225,310,1);
   circle(235,310,1);
   circle(230,320,1);

 

  setcolor(j);
  delay(100);
  clearviewport();
      
    delay(1000);
      for(i=100;i<400; i+=10, j++)
      {
 if(kbhit())
  break;

 

  outtextxy(225,220,"Made by Rahul");
  outtextxy(300,180,"BHOPAL");
  gotoxy(25,25);
  printf("MP NAGAR");
  delay(10);
  outtextxy(60+i,350,"1243");

 

  rectangle(0,0, 620, 420);          // bus
  rectangle(50+i,275,150+i,400);
  rectangle(150+i,350,200+i,400);
  circle(75+i,410,10);
  circle(175+i,410,10);
  setcolor(j);
  delay(100);
  if(i==420)
  break;
  clearviewport();
     

 

 for(i=0; i<=; i=i+10,j++)
      {
  if(kbhit())
  break;
      outtextxy(225,220,"Made by Rahul");
 outtextxy(300,180,"BHOPAL");
 gotoxy(70,20);
 printf("CHETAK");
      delay(10);
   rectangle(0,0, 620, 420);
  rectangle(500,305-i,600,410-i);
  rectangle(555,230-i,600,305-i);
  circle(610,360-i,10);
  circle(610,300-i,10);
  outtextxy(520,350-i,"1240");

 

  circle(480,315,15);   // boy
  line(480,330,480,375);
  line(480,375,460, 400);
  line(480,375,500,400);
  line(480,340,500,350);
  line(460,360,480,340);

 

   circle(475,310,1);
   circle(485,310,1);
   circle(480,320,2);
  gotoxy(60,17);
  printf("Atul Mahendra");

 

  circle(530,315,15);         //boy
  line(530,330,530,375);
  line(530,375,530, 400);
  line(530,375,550,400);
  line(530,340,550,350);
  line(510,360,530,340);
   circle(525,310,1);
   circle(535,310,1);
   circle(530,320,2);

 

  setcolor(j);
  delay(100);
  if(i==420)
  break;
  clearviewport();
      }
   delay(1000);
 for(i=50; i<=220; i=i+10,j++)
      {
  if(kbhit())
  break;
      outtextxy(225,220,"Made by Rahul");
 outtextxy(300,180,"BHOPAL");
 gotoxy(70,20);
 printf("CHETAK");
      delay(10);
   rectangle(0,0, 620, 420);
  rectangle(500,305-i,600,410-i);
  rectangle(555,230-i,600,305-i);
  circle(610,360-i,10);
  circle(610,300-i,10);
   outtextxy(520,350-i,"1240");

 

  setcolor(j);
  delay(100);
  if(i==420)
  break;
  clearviewport();
      }

 

 for(i=0; i<=250; i=i+10,j++)
      {
  if(kbhit())
  break;
      outtextxy(225,220,"Made by Rahul");
    outtextxy(300,180,"BHOPAL");
  gotoxy(25,5);
 printf("PIPLANI");
      delay(10);
    rectangle(0,0, 620, 420);
  rectangle(495-i,20,620-i,100);
  rectangle(425-i,20,495-i,50);
  circle(475-i,10,10);
  circle(580-i,10,10);
  outtextxy(520-i,50,"1250");

 


  circle(180,15,15);   // boy
  line(180, 30,180, 75);
  line(180, 75,160, 100);
  line(180, 75,200,100);
  line(180, 40,200, 50);
  line(160, 60,180, 40);
   circle(175,10,1);
   circle(185,10,1);
   circle(180,20,2);
  gotoxy(15,8);
  printf("Rahul Gajju");

 

  circle(130,15,15);         //boy
  line(130, 30,130, 75);
  line(130, 75,130, 100);
  line(130, 75,150,100);
  line(130, 40,150, 50);
  line(110, 60,130, 40);
   circle(125,10,1);
   circle(135,10,1);
   circle(130,20,2);
  setcolor(j);
  delay(100);
  if(i==420)
  break;
  clearviewport();
      }
       delay(1000);

 

 for(i=250; i<=450; i=i+10,j++)
      {
  if(kbhit())
  break;
      outtextxy(225,220,"Made by Rahul");
    outtextxy(300,180,"BHOPAL");
  gotoxy(25,5);
 printf("PIPLANI");
      delay(10);
    rectangle(0,0, 620, 420);
  rectangle(495-i,20,620-i,100);
  rectangle(425-i,20,495-i,50);
  circle(475-i,10,10);
  circle(580-i,10,10);
  outtextxy(520-i,50,"1250");
  setcolor(j);
  delay(100);
  if(i==420)
  break;
  clearviewport();
      }
      for(i=0; i<=220; i+=10, j++)
      {     if(kbhit())
  break;
      outtextxy(225,220,"Made by Rahul");
    outtextxy(300,180,"BHOPAL");
  gotoxy(5,25);
 printf("Boys Hostel");
      delay(10);
      rectangle(0,0,620,420);
      rectangle(20,10+i,120,120+i);
      rectangle(20, 120+i, 70, 195+i);
      circle(10, 50+i,10);
     circle(10, 150+i,10);
     gotoxy(10,18);
     printf("Banti");

 

  circle(80,315,15);   // boy
  line(80,330,80,375);
  line(80,375,60, 400);
  line(80,375,100,400);
  line(80,340,100,350);
  line(60,360,80,340);
   circle(75,310,1);
   circle(85,310,1);
   circle(80,320,2);

 

 outtextxy(20,50+i,"1248");
     setcolor(j);
     delay(100);
     if(i==220)
     break;

 

     clearviewport();
     }

 


   for(i=0; i<=555; i=i+10,j++)
   {
  if(kbhit())
  break;
  outtextxy(225,220,"Made by Rahul");
  outtextxy(300,180,"BHOPAL");
  settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);

 

  outtextxy(545,250,"BIST GATE");
  delay(10);
  settextstyle(GOTHIC_FONT, HORIZ_DIR, 4);
  outtextxy(60+i,350,"1247");
  rectangle(0,0, 620, 420);          // bus
  rectangle(50+i,275,150+i,400);
  rectangle(150+i,350,200+i,400);
  circle(75+i,410,10);
  circle(175+i,410,10);
     gotoxy(10,18);
   printf("Banti");
   line(95,320,130,305);
   gotoxy(15,20);
   printf("Rukooooo...");
   settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);
   outtextxy(180+i,312,"Bus Full");

 

    settextstyle(GOTHIC_FONT, HORIZ_DIR, 4);

 

   circle(125+i, 330 ,15);
   circle(120+i,325,1);
   circle(130+i,325,1);
   circle(125+i,335,2);

 

   rectangle(105+i,310,145+i,350);
   line(142+i,330,170+i,320);

 


  circle(80,315,15);   // boy
        line(80,330,80,375);
  line(80,375,60, 400);
  line(80,375,100,400);
  line(80,340,100,360);
  line(60,360,80,340);

 


   circle(75,310,1);
   circle(85,310,1);
   circle(80,320,2);

 

  line(555,260,555,420);
  line(555,260,650,260);
  ellipse(590,300,400,150,40,80);

 

  setcolor(j);
  delay(100);
  clearviewport();
      }

 


   for(i=0; i<1000; i++)
   {
   if(kbhit())
   break;

 


  setcolor(j);
  j++;
   settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);
   outtextxy(120,120,"''Welcome to Bansal College''");
  outtextxy(555,235,"BIST");
   settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);

 

  rectangle(0,0,620,400);
  line(555,260,555,400);
  line(555,260,650,260);
  ellipse(590,300,400,150,40,80);
     m++;
  outtextxy(m-100,280+n,"Atul Mahendra Vinay");
  outtextxy(m-250,280+n,"Prakriti Puja");
  outtextxy(m-400,280+n,"Gajju Rahul");
  circle(z-420,315,15);
  line(z-420,330,z-420,375);
  line(z-420,375,z-420-l, 400);
  line(z-420,375,z-420+l,400);
  line(z-420,340,z-400,350);
  line(z-420,340,z-420-h,360);

 


  circle(z-370,315,15);
  line(z-370,330,z-370,375);
  line(z-370,375,z-370-l, 400);
  line(z-370,375,z-370+l,400);
  line(z-370,340,z-350,350);
  line(z-370,340,z-370-h,360);

 

  circle(z-270,315,15);
  line(z-270,330,z-270,375);
  line(z-270,375,z-270-l, 400);
  line(z-270,375,z-270+l,400);
  line(z-270,340,z-250,350);
  line(z-270,340,z-270-h,360);

 


  circle(z-220,315,15);
  line(z-220,330,z-220,375);
  line(z-220,375,z-220-l, 400);
  line(z-220,375,z-220+l,400);
  line(z-220,340,z-200,350);
  line(z-220,340,z-220-h,360);

 

  circle(z-120,315,15);
  line(z-120,330,z-120,375);
  line(z-120,375,z-120-l, 400);
  line(z-120,375,z-120+l,400);
  line(z-120,340,z-100,350);
  line(z-120,340,z-120-h,360);

 

  circle(z-70,315,15);
  line(z-70,330,z-70,375);
  line(z-70,375,z-70-l, 400);
  line(z-70,375,z-70+l,400);
  line(z-70,340,z-50,350);
  line(z-70,340,z-70-h,360);

 

  circle(z-20,315,15);
  line(z-20,330,z-20,375);
  line(z-20,375,z-20-l, 400);
  line(z-20,375,z-20+l,400);
  line(z-20,340,z,350);
  line(z-20,340,z-20-h,360);

 

   circle(15+i,310,1);
   circle(25+i,310,1);
   circle(20+i,320,2);

 

   circle(-35+i,310,1);
   circle(-25+i,310,1);
   circle(-30+i,320,2);

 

   circle(-85+i,310,1);
   circle(-75+i,310,1);
   circle(-80+i,320,2);

 

   circle(-185+i,310,1);
   circle(-175+i,310,1);
   circle(-180+i,320,1);
   line(-195+i,320, -200+i,340);
   line(-165+i,320, -160+i,340);

 

   line(-245+i,320, -250+i,340);
   line(-215+i,320, -210+i,340);

 

   circle(-235+i,310,1);
   circle(-225+i,310,1);
   circle(-230+i,320,1);

 

   circle(-385+i,310,1);
   circle(-375+i,310,1);
   circle(-380+i,320,2);

 

   circle(-335+i,310,1);
   circle(-325+i,310,1);
   circle(-330+i,320,2);
  c++;
  if(c==0)
  c=-100;
  setcolor(0);
  delay(20);

 

        z++;
  l--;
  if(l==-15)
  l=15;
  if(ht==1)
  h++;
  else
  h--;
  if(h==15)
  ht=0;
  else
  if(h==-15)
  ht=1;

 

  clearviewport();

 

  }

 

     clearviewport();
   while(!kbhit())
   {

 

   for(j=0;j<10;j+=1, k++)
   {
      setviewport(0,0,0,0,0);
      settextstyle(GOTHIC_FONT, HORIZ_DIR, 4);
       outtextxy(100,440,"Presented by Rahul Agrawal.");

 

 settextstyle(DEFAULT_FONT, HORIZ_DIR, 5);

 

      delay(10);
      for(i=0,x=0,o=0;o<10,i<=210, x<=210; i=i+1,o+=4, x+=2)
      {
      setcolor(k);
       rectangle(0,0,470,440);
      circle(20+i,230-i,20);
 circle(230+i, 20+i,20);
       circle(440-i, 230+i,20);
 circle(230-i, 440-i,20);
     circle(20+o,230,20);
     circle(450-o,230,20);
     circle(230,20+o,20);
     circle(230,450-o,20);
 circle(20+x,230-x,15);
 circle(230+x, 20+x,15);
       circle(440-x, 230+x,15);
 circle(230-x, 440-x,15);
       circle(235-o,235-o,20);
   circle(235+o,235+o,20);
  circle(235+o,235-o,20);
 circle(235-o,235+o,20);
     delay(10);
      setcolor(k+2);
      outtextxy(150,240,"Thanks");
      delay(10);
      clearviewport();
      if(kbhit())
      break;
      }
    for(i=115,o=0, x=0; i<=210,o<500, x<=210; i+=1,o+=4, x+=2)
    {
 circle(230+i,20+i,20);
 circle(440-i, 230+i,20);
 circle(230-i, 440-i,20);
 circle(20+i, 230-i,20);
     circle(20+o,230,20);
     circle(450-o,230,20);
 circle(20+x,230-x,15);
     circle(235-o,235-o,20);
   circle(235+o,235+o,20);
  circle(235+o,235-o,20);
 circle(235-o,235+o,20);
 circle(230+x, 20+x,15);
       circle(440-x, 230+x,15);
 circle(230-x, 440-x,15);
  circle(230,20+o,20);
     circle(230,450-o,20);
  setcolor(k);
       rectangle(0,0,470,440);
 delay(10);

 

      setcolor(k+2);
      outtextxy(150,240,"Thanks");
      delay(10);
 clearviewport();
 if(kbhit())
 break;
    }

 

     }        }

 


      getch();
}



 


 
Today, there have been 1723 visitors (4078 hits) on this page!
=> Do you also want a homepage for free? Then click here! <=