#include "c:\\turboc3\\bin\\mouse.h"
#include <stdlib.h>
#include<math.h>
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <iostream.h>
void main()
{
int gd=0,gm=0;
initgraph(&gd,&gm,"c:\\turboc3\\bgi");
char ch[50]= "Welcome to World of Books and Readers ";
char str[50][3];
int l;
border(6);
l = strlen(ch);
cout << l;
int i;
for(i=0;i<l;i++)
{
str[i][0] = ch[i];
str[i][1] = '\0';
}
float x,y;
int x1,y1,b;
i=0;
while(!kbhit())
{
i=l;
int temp;
if(b==0)
show_ptr(&temp,&temp,&b);
else
{
show_ptr(&x1,&y1,&b);
}
for(float k=0;k<180 ;k+=4.5)
{
setcolor(random(15));
x = 315+ x1*cos(k/180 * 3.14);
y = y1*sin(k/180 * 3.14);
i--;
settextstyle(0,0,2);
outtextxy(x,y,str[i]);
}
delay(100);
cleardevice();
border(6);
}
getch();
cout << x1 << " " << y1;
getch();
}
#include <stdlib.h>
#include<math.h>
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <iostream.h>
void main()
{
int gd=0,gm=0;
initgraph(&gd,&gm,"c:\\turboc3\\bgi");
char ch[50]= "Welcome to World of Books and Readers ";
char str[50][3];
int l;
border(6);
l = strlen(ch);
cout << l;
int i;
for(i=0;i<l;i++)
{
str[i][0] = ch[i];
str[i][1] = '\0';
}
float x,y;
int x1,y1,b;
i=0;
while(!kbhit())
{
i=l;
int temp;
if(b==0)
show_ptr(&temp,&temp,&b);
else
{
show_ptr(&x1,&y1,&b);
}
for(float k=0;k<180 ;k+=4.5)
{
setcolor(random(15));
x = 315+ x1*cos(k/180 * 3.14);
y = y1*sin(k/180 * 3.14);
i--;
settextstyle(0,0,2);
outtextxy(x,y,str[i]);
}
delay(100);
cleardevice();
border(6);
}
getch();
cout << x1 << " " << y1;
getch();
}
OUTPUT:
CONTROL THIS CURVE FORMED BY TEXT ,BY DRAG AND DROP WITH MOUSE
No comments:
Post a Comment