Welcome to Onlinetunes24 .....

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 1 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 2 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 3 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 4 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

Moving two circle above a line by Programming in C.

#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<graphics.h>

void main ()
{
int gd=DETECT, gm=DETECT, i,j,x,x2,y;
initgraph(&gd, &gm, "c:\\TurboC3\\bgi");
setcolor(RED);
delay (100);
line(100,161,600,161);

x=100;
y=150;
x2=600;
 

for(i=0, j=0; i<245,j<245; i+=5,j+=5)
{
circle(x+i, y, 10);
circle(x2-j, y, 10);
delay(100);
setcolor(BLACK);
circle(x+i, y, 10);
circle(x2-j, y, 10);
setcolor(RED);
}
 

rectangle(300,125,350,150);
rectangle(360,125,410,150);

getch();
}

National Flag of Bangladesh by programmign in C

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int driver = DETECT, mode=0;
initgraph (&driver, &mode, "..\\bgi");
delay(1000);
printf ("\n\n\n\t\t\t National Flag of Bangladesh");
printf("\n\t\t\t Programmed by Mohammad Lukman Hussain");
delay(1000);

setcolor(2); /* Flag's Rectangle */
//rectangle(200, 150, 450, 300);
rectangle(200,150,400,250);
setfillstyle(1,2);
floodfill(325,225,2);
delay(1000);

setcolor(4); /* Flag's Circle */
//circle(325,225,50);
circle(300,200,30);
setfillstyle(1,4);
floodfill(300,200,4);
delay(1000);

setcolor(3); /* Flag's Stand */
rectangle(190,150,200,400);
setfillstyle(1,5);
floodfill(190,350,3);
delay(1000);

setcolor(3); /* Ground Stand */
rectangle(180,400,210,410);
rectangle(170,410,220,420);
rectangle(160,420,230,430);
delay(1000);

getch();
}

How to create a HTTP Server using Cisco Packet Tracer.


Moving Wheel using Mid-Point Circle algorithm and DDA Line algorithm

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
#include<dos.h>

int l = 1;

void ddaline(int x1, int y1, int x2, int y2)
{

    int s, dx, dy, m;
    float xi, yi, x, y;

    dx = x2 - x1;
    dy = y2 - y1;

    if (abs(dx) > abs(dy))
    s = abs(dx);
    else
    s = abs(dy);

    xi = dx / (float) s;
    yi = dy / (float) s;

    x = x1;
    y = y1;

    putpixel(x1 + 0.5, y1 + 0.5, 15);

    for (m = 0; m < s; m++) {
    x += xi;
    y += yi;
    putpixel(x + 0.5, y + 0.5, 15);
    }
}


void plotpoints1(int x, int y, int cx, int cy)
{
    putpixel(cx + x, cy + y, 15);
    putpixel(cx - x, cy - y, 15);
    putpixel(cx - y, cy + x, 15);
    putpixel(cx + y, cy - x, 15);
    if (l % 20 == 0) {
    ddaline(cx - x, cy - y, cx + x, cy + y);
    ddaline(cx - y, cy + x, cx + y, cy - x);
    }
    l++;
}

void plotpoints2(int x, int y, int cx, int cy)
{

    putpixel(cx - x, cy + y, 15);
    putpixel(cx + x, cy - y, 15);
    putpixel(cx + y, cy + x, 15);
    putpixel(cx - y, cy - x, 15);
    if (l % 20 == 0) {
    ddaline(cx + x, cy - y, cx - x, cy + y);
    ddaline(cx - y, cy - x, cx + y, cy + x);
    }
    l++;
}


void mcircle(int cx, int cy, int r)
{
    int x = 0, y, p;

    y = r;
    p = 1 - r;


    while (x < y) {
    plotpoints1(x, y, cx, cy);
    x++;
    if (p < 0)
        p += 2 * x + 1;
    else {
        y--;
        p += 2 * (x - y) + 1;
    }
    }



    x = y + 1;
    while (abs(x) > 0) {
    plotpoints2(x, y, cx, cy);
    x--;
    if (p >= 0)
        p = p - 2 * x - 1;
    else {
        y++;
        p = p - 2 * (x - y) - 1;
    }
    }
}

void main()
{
    int gd = DETECT, gm = DETECT;
    int i = 0;
    initgraph(&gd, &gm, "..\\bgi");

    while (!kbhit()) {
    if (i > 640)
        i = -200;
    cleardevice();
    mcircle(100 + (i++), 200, 100);
    delay(90);
    i++;
    }
    getch();
}

Animation circel Using Programmign C

Program 1:
 
#include<stdio.h>
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include<stdlib.h>
void main()
{int p,q,r;
int x,y;
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, "..\\bgi");

x=getmaxx()/2;
y=getmaxy()/2;
for(q=1;q<15;q++)
{
setcolor(q);
for(p=400;p>1;p--)
{
circle(x,y,p);
}
setcolor(q+2);
for(r=1;r<400;r++)
{
circle(x,y,r);
}
}
getch();
}



Program 2:

#include<graphics.h>
#include<stdio.h>
#include<dos.h>
#include<conio.h>

main()
{
int gd=DETECT,gm,col=0;
initgraph(&gd,&gm,"..\\bgi");
while(!kbhit())
{
setcolor(15);
circle(col,100,50);
delay(50);

col++;
if(col>=600)
col=0;
cleardevice();
}
}


Program 3:

#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include<dos.h>
#include<math.h>

void main()
{
    int gd=DETECT,gm;
    initgraph(&gd,&gm,"..\\bgi");
    int x=100,y=100,r=20;
    float c=.1;
    for(float i=0;i<100;i=i+.1)
    {
        delay(50);
        cleardevice();
        line(x+i,y,x+i+r*cos(i),y+r*sin(i));
        line(x+i,y,x+i+r*cos(90+i),y+r*sin(90+i));
        line(x+i,y,x+i+r*cos(135+i),y+r*sin(135+i));
        line(x+i,y,x+i+r*cos(180+i),y+r*sin(180+i));
        line(x+i,y,x+i+r*cos(225+i),y+r*sin(225+i));
        line(x+i,y,x+i+r*cos(315+i),y+r*sin(315+i));
        circle(x+i,y,r);
        if(kbhit())
        {
            if(getch())
            {
                printf("break");
                if(getch()){}
             }

        }

    }
       //    getch();
}

Circle using Programmign C

#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<graphics.h>

void main ()
{
 int gd=DETECT, gm=DETECT, i, x=100, y=150;
 initgraph(&gd, &gm, "..\\bgi");
 setcolor(RED);

 while(1)
 {
x=100;
y=150;

 for(i=0; i<250; i+=5)
 {
 circle(x+i, y+i, 10);
 delay(100);
 setcolor(BLACK);
 circle(x+i, y+i, 10);
 setcolor(RED);
 }
 x=350;
 y=400;
 for(i=0; i<250; i+=5)
 {
 circle(x+i, y-i, 10);
 delay(100);
 setcolor(BLACK);
 circle(x+i, y-i, 10);
 setcolor(RED);
 }

 x=600;
 y=150;
 for(i=0; i<500; i+=5)
 {
 circle(x-i, y, 10);
 delay(100);
 setcolor(BLACK);
 circle(x-i, y, 10);
 setcolor(RED);
 }

  }

getch();
}

Smile face in Programming C

#include<graphics.h>
#include<dos.h>
#include<conio.h>
#include<stdlib.h>

void main()
{
   int gd = DETECT, gm, area, temp1, temp2, left = 25, top = 75;
   void *p;

   initgraph(&gd,&gm,"..\\bgi");

   setcolor(YELLOW);
   circle(50,100,25);
   setfillstyle(SOLID_FILL,YELLOW);
   floodfill(50,100,YELLOW);

   setcolor(RED);
   setfillstyle(SOLID_FILL,RED);
   fillellipse(44,85,2,6);
   fillellipse(56,85,2,6);

   ellipse(50,100,205,335,20,9);
   ellipse(50,100,205,335,20,10);
   ellipse(50,100,205,335,20,11);

   area = imagesize(left, top, left + 50, top + 50);
   p = malloc(area);

   setcolor(WHITE);
   settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2);
   outtextxy(155,451,"Smiling Face Animation");

   setcolor(BLUE);
   rectangle(0,0,639,449);

   while(!kbhit())
   {
      temp1 = 1 + random ( 588 );
      temp2 = 1 + random ( 380 );

      getimage(left, top, left + 50, top + 50, p);
      putimage(left, top, p, XOR_PUT);
      putimage(temp1 , temp2, p, XOR_PUT);
      delay(200);
      left = temp1;
      top = temp2;
      delay(200);
   }

   getch();
   closegraph();
}

Loading
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Flying Twitter Bird Widget By ICT Sparkle