Enter Your names and the person's name you want to check your percentage with.
Suppose U entered.
Salman
Katrina
Then it will use two strings
str1=Salman Loves Katrina
str2=Katrina Loves Salman
again
for str1
it would make a number
where it would see for occurrence of each character
in
"Salman Loves Katrina"
242121111111
Salmnovektri
these are.occurencd of each alphabet (here name is case insensitive)
and if one character is used it is not counted again
242121111111
it would add
like
num[i]=num[i]+num[length-i]
it would give 353232
it would go repeatedly
till one digit number is obtained
585
108
90
9
num1=9
and the same will be done to
"Katrina Loves Salman"
141112211121
262224
684
108
90
9
num2=9
(co incidence)
now it will generate
num=10*num1+num2
i.e. 99%
- Supported by javascript thanks for visiting