# Friendship Calculator With Poll

Discussion in 'C' started by TEJUS, Aug 12, 2006.

?

## DID U LIKE IT ?

50.0%

36.4%

9.1%

4.5%
1. ### TEJUSNew Member

Joined:
Aug 6, 2006
Messages:
11
1
Trophy Points:
3
Occupation:
STUDENT
Location:
IN KERALA,KOLLAM
====================
.FRIENDSHIP CALCULATOR.
====================
Code:
```#include<stdio.h>
#include<string.h>
#include<conio.h>
main()
{
clrscr();
char name[20],n[20];
char *pointer;
int a,b;
printf("\n NAME: ");
gets(name);
printf("\n FRIEND's NAME: ");
gets(n);
b=0;
for(a=1;n[a]!='\0';a++)
{
pointer=strchr(name,n[a]);
if(pointer)
{
b=b+1;
}
}
b=b*25;
if(b>=100)
{
printf("\n %s AND %s ARE 100% TRUE FRIEND'S."name,n);
}
else
{
printf("\n %s AND %s ARE %d% TRUE FRIEND'S."name,n,b);
}
getch();
return 0;
}```

#### Attached Files:

• ###### WEB ATTACH.zip
File size:
2.4 KB
Views:
581
saurabh vora likes this.
2. ### rahul.mca2001New Member

Joined:
Feb 13, 2008
Messages:
103
0
Trophy Points:
0
nice yaar

Joined:
Jan 9, 2008
Messages:
356
14
Trophy Points:
0
Occupation:
Developer
Location:
NOIDA
Good things ...Just Keep it and post more articles Tejus.

4. ### rikk_awalNew Member

Joined:
Mar 21, 2009
Messages:
1
0
Trophy Points:
0
its cool yaar

5. ### cindrillaNew Member

Joined:
Sep 26, 2010
Messages:
16
0
Trophy Points:
0
Occupation:
student
Location:
ya very 5n

Joined:
Nov 16, 2010
Messages:
2