Recent Articles
- Vectors in C++, Started by blitzcoder in C-C++
- Making a screensaver in C++, Started by blitzcoder in C-C++
- Detecting errors using CRC-32 (for IEEE802.3) code, Started by blitzcoder in C-C++
- Get BGI Graphics To Work In Dev-Cpp, Started by blitzcoder in C-C++
- Find roots of any linear algebraic nth order equation by Regula Falsi method, Started by coderzone in C-C++
Similar Articles
.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;
}











Yet to provide details about himself

Linear Mode
