Wednesday, October 10, 2007

Are u both really made for each other find out !!!



WHATS BETWEEN US YA ???


Intro ::....

This program is actually based on the fun game FLAMES i hope every one would have heard about it... If not follow me... In FLAMES

F - Friends

L - Love

A - Affection

M - Marriage

E - Enemy

S - Sister or in general any other relartion...

Its totally fun try it out in your system by copying this code.... In this program i have used the concept on circularly linked list from data structures a popular concept.... I have tried out this program with the repuisition of some of my friends... I hope u ll surely enjoy it.....


Source Code ::....

/*PROGRAM TO IMPLEMENT " FLAMES " */

#include stdio.h
#include string.h
#include alloc.h
#include conio.h

struct node
{
int data;
struct node *next;
}*head,*p,*old;

void main()
{
char s1[10],s2[10];
int i,j,k,l1,l2,l,s,c=0,g=0,opt;
clrscr();
printf("\n\n\n\n\tEnter the first string\n\t");
gets(s1);
l1=strlen(s1);
printf("\n\n\tEnter the second string\n\t");
gets(s2);
l2=strlen(s2);
for(i=0;i {
if(s1[i]==32)
g++;
for(j=0;j
{
if(s1[i]==s2[j]&&s1[i]!=32)
{
c+=2;
s=j;
for(k=j+1 k s2[s++]=s2[k];
j=l2;
}
}
}
for(i=0;i
if(s2[i]==32)
g++;
l=l1+l2-c-g;
head=(struct node *)malloc(sizeof(struct node));
head->data=1;
p=head;
for(i=2;i<=6;i++)
{

p->next=(struct node *)malloc(sizeof(struct node));
p=p->next;
p->data=i;
}
p->next=head;
p=head;
for(i=6;i>1;i--)
{
j=1;
while(j
old=p;
p=p->next;
j++;
}
old->next=p->next;
head=old->next;
p=head;
}
opt=head->data;
switch(opt)
{
case 1:
printf("\n\n\n\n\n\t\tLETS BETTER BE GOOD FRIENDS ");
break;
case 2:
printf("\n\n\n\n\n\t\tLOVE... AH... AH.. ");
break;
case 3:
printf("\n\n\n\n\n\t\tUH ONLY AN AFFECTION IT SEEMS ");
break;
case 4:
printf("\n\n\n\n\n\t\tENDS IN A MARRIAGE !!! ");
break;
case 5:
printf("\n\n\n\n\n\t\tYOU ARE MY FIRST ENEMY ");
break;
case 6:
printf("\n\n\n\t\tSOME HOW RELATED");
break;
}
getch();
}

Merits ::...


* Its totally fun and it no longer requires any manual calculation to enjoy it....
* It calculates exactly with or without the inclusion of initials....
* It helps one to understand the concepts related to circularly linked list...


Sample Output ::....

Enter the first name

JOSEPH

Enter the next name

STEPHEN

LETS BETTER BE GOOD FRIENDS...


Ull surely love experiencing this..... Want to know ur real relationship... Try this out by clicking the link below....


http://www.ziddu.com/download.php?uid=a7Gdl5iqa6%2BcnOKnZ6qhkZSrZKqal5uu7

http://www.ziddu.com/download.php?uid=ZKqcnJioaLKilpbzZaqZnJGlaaeZlZymaA%3D%3D3

Look out::....

Please do not take it seriously... Its just a fun game and nothing more than that....This program can be run on any C compiler as this is a C program... Your comments are always welcomed....


Friday, September 14, 2007

Make your data more secured !!!





PASSWORD PLEASE



Intro ::....

This program deals with the passwords.... U can know the entire details if u just compile them... This is just a sample program to just make u understand the basic concept.... U can use this program anywhere with some modifications as per ur necessity....


Source Code ::...


/*PROGRAM TO DEAL WITH PASSWORD*/


#include stdio.h
#include conio.h
#include process.h
#include ctype.h

FILE *fp;
int i,j,c[10],opt,pa;
char a[10]=" ",b[10]=" ";
void pass();

void main()
{
g:clrscr();
printf("\n\n\n\t\tENTER YOUR OPTION\n\n\n\n\t1.CHECK PASSWORD\n\n\n\t2.CHANGE PASSWORD\n\n\t");
scanf("%d",&opt);
switch(opt)
{
case 1:
{
fp=fopen("pass.txt","r");
fgets(b,20,fp);
fscanf(fp,"%d",&i);
fclose(fp);
pa=i;
clrscr();
printf("\n\n\n\tPASSWORD PLEASE\n\n\n\t");
for(i=0;i<=20;i++)
{
a[i]=getch();
c[i]=toascii(a[i]);
if(c[i]==13)
{
pass();
exit(0);
}
else
printf("*");
}
}
case 2:
{
clrscr();
printf("\n\n\n\n\tENTER YOUR NEW PASSWORD\n\n\t");
for(i=0;i<=20;i++)
{
b[i]=getch();
c[i]=toascii(b[i]);
if(c[i]==13)
{
fp=fopen("pass.txt","w+");
fprintf(fp,"%s\n%d",b,i);
fclose(fp); goto g;
}
else printf("*");
}
}
}
}

void pass()
{
int k=0;
for(j=0;j<=i;j++)
{
if(a[j]==b[j])
k++;
}
if(pa==i&&k==pa)
printf("\n\n\n\n\n\t\tWELCOME U HAVE ENTERED THE RIGHT PASSWORD");
else
printf("\n\n\n\n\n\n\t\tCHECK YOUR PASSWORD");
getch();
}

Merits ::...

* This program is very helpful as this can be attached with any of ur other programs to improve ur security....
* I personally didnt find any exceptional cases here...
* U can set ur password to any number of digits as passwords... It may contain alphabets digits or numbers...


Sample Output ::....





U can try this out by your self by clicking the link below..... Its really funny... The default password is "vignesh"......

http://www.ziddu.com/download.php?uid=Zqydl5mnZa%2BdlZzzZ6qZnJGla6eZlZ2saA%3D%3D5

http://www.ziddu.com/download.php?uid=aqyam5yub6uZmZTza6qZnJGlb6eZlZ2qbg%3D%3D9


Look Out ::...
This program can be run on any C compiler as this is a C program... Your comments are always welcomed....

I can give u alphabets if u give me DIGITS !!!


1 -- ONe 2 -- tWO 000 -- ZERo




Intro ::...


This program generates or gives alphabets for digits... For eg.. if u enter 200 it gets displayed as " Two hundred " Cool is'nt it.. I took great pain in bringing up this program... Try it out...


Source code :::...




/*PROGRAM THAT GIVES NUMBER IN WORDS*/



#include stdio.h
#include conio.h
#include string.h

char t[40]=" ",u[40]=" ",v[40]=" ",w[40]=" ",y[40]=" ";
void d1(char [9][20],long int );
void d2(char [9][20],char [18][20],long int );
int d3(char [9][20],char [18][20],long int ,char [6],char [3][10]);
void d4(char [9][20],char [18][20],long int ,char [6],char [3][10],int ,int );
void ch(char [9][20],char [18][20],long int ,char [6],char [3][10],int ,int );

void main()
{
int i=0,x,k=0;
long int n,num,z,j;
char a[9][20]={" one"," two"," three"," four"," five"," six"," seven"," eight"," nine"},b[18][20]={" ten"," eleven"," twelve"," thirteen"," fourteen"," fifteen"," sixteen"," seventeen"," eighteeen"," nineteen","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"};
char c[3][10]={" hundred"," thousand"," lakh"},an[6]={" and "};
clrscr();
printf("\n\n\n\n\n\n\n\n\n\ENTER THE NUMBER\n\n\t");
scanf("%ld",&n);
num=n;
while(n!=0)
{
n=n/10;
i++;
}
k=i;
switch(i)
{
case 0:
{
printf("zero\n");
break;
}
case 1:
{
d1(a,num);
puts(t);
break;
}
case 2:
{
d2(a,b,num);
puts(t);
break;
}
case 3:
{
x=d3(a,b,num,an,c);
puts(a[x-1]);
break;
}
case 4:
case 5:
{
d4(a,b,num,an,c,k,x);
puts(u);
break;
}
case 6:
case 7:
case 8:
{
z=num;
num=z/100000;
j=num;
ch(a,b,num,an,c,j,x);
strcat(t,c[2]);
strcpy(y,t);
num=z%100000;
if(num==0)
{
if(i==1)
puts(y);
else
{
strcat(t,"s");
puts(t);
}
}
else
{
j=num;
ch(a,b,num,an,c,j,x);
strcat(y,t);
puts(y);
}
break;
}
}
getch();
}



void d1(char a[9][20],long int num)
{
strcpy(t,v);
num%=10;
strcpy(t,a[num-1]);
}

void d2(char a[9][20],char b[18][20],long int num)
{
int i=0,j,k;
strcpy(t,v);
if(num/10==1)
{
num%=10;
strcpy(t,b[num]);
}
else
{
if(num%10==0)
{
num/=10;
strcpy(t,b[num+8]);
}
else
{ while(i<2) k="num%10;" i="1)" j="k;">int d3(char a[9][20],char b[18][20],long int num,char an[6],char c[3][10])
{
int i=0;
i=num/100;
strcpy(t,v);
if(num%100==0)
strcat(a[i-1],c[0]);
else
{
num%=100;
if((num/10)%10==0)
d1(a,num);
else d2(a,b,num);
strcat(a[i-1],c[0]);
strcat(a[i-1],an);
strcat(a[i-1],t);
}
return(i);
}


void d4(char a[9][20],char b[18][20],long int num,char an[6],char c[3][10],int k,int x)
{
int j=0;
long int i,n;
strcpy(u,v);
i=num/1000;
if(num%1000==0)
{
if(k==5)
{
n=num;
num=i;
d2(a,b,num);
num=n;
strcat(t,c[1]);
strcat(u,t);
}
else
{
strcat(a[i-1],c[1]);
strcat(u,a[i-1]);
}
}
else
{
if(k==5)
{
n=num;
num=i;
d2(a,b,num);
num=n;
strcat(u,t);
}
else
strcat(u,a[i-1]);
strcat(u,c[1]);
num%=1000;
n=num;
j=0;
while(n!=0)
{
n/=10;
j++;
}
if(j==1)
{
d1(a,num);
strcat(u,an);
strcat(u,t);
}
else if(j==2)
{
d2(a,b,num);
strcat(u,an);
strcat(u,t);
}
else
{
x=d3(a,b,num,an,c);
strcat(u,a[x-1]);
}
}
}


void ch(char a[9][20],char b[18][20],long int num,char an[6],char c[3[10],int j,int x)
{
int i=0,k;
strcpy(t,v);
while(j!=0)
{
j/=10;
i++;
}
if(i==1)
d1(a,num);
else if(i==2)
d2(a,b,num);
else if(i==3)
{
x=d3(a,b,num,an,c);
strcpy(t,a[x-1]);
}
else
{
k=i;
d4(a,b,num,an,c,k,x);
strcpy(t,u);
}
}




Merits ::...


* This program does not contain any exceptional cases..
* This program is valid upto eight digits and not more..




Sample Output ::....




If u want to try this out personally then clik the link below... Its really fuuny..... Enjoy!!!

http://www.ziddu.com/download.php?uid=aaqcnJesbaudlpbzaqqZnJGlbqeZlZymaQ%3D%3D8

http://www.ziddu.com/download.php?uid=Z6qfmJSnbK%2Bam5zzaKqZnJGlbKeZlZyoaw%3D%3D6

Look out ::...

This program can be run on anyother normal C compilers... Your comments are always welcomed....