View Poll Results: DID U LIKE IT ?
YA,VERY VERY GOOD 11 50.00%
SEEMS GOOD 8 36.36%
NOT AT ALL. 2 9.09%
VERY BAD. 1 4.55%
Voters: 22. You may not vote on this poll

Friendship Calculator With Poll

TEJUS's Avatar author of Friendship Calculator With Poll
This is an article on Friendship Calculator With Poll in C.
====================
.FRIENDSHIP CALCULATOR.
====================
Code: C
#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
File Type: zip WEB ATTACH.zip (2.4 KB, 59 views)
saurabh vora like this
rahul.mca2001's Avatar, Join Date: Feb 2008
Ambitious contributor
nice yaar
asadullah.ansari's Avatar, Join Date: Jan 2008
TechCake
Good things ...Just Keep it and post more articles Tejus.
rikk_awal's Avatar, Join Date: Mar 2009
Newbie Member
its cool yaar
cindrilla's Avatar, Join Date: Sep 2010
Go4Expert Member
ya very 5n
saahra's Avatar, Join Date: Nov 2010
Newbie Member
hey its gud..but can u explain me d logic plzz..!!