LOVE CALCULATOR

Involve fun in coding, and then you will start loving it. Below is the program I made it just for fun, now or even in future I don’t think this program will be of any use. Though you can look over the logic I implemented.
In Childhood I think everyone of us had played a game called FLAME, where F for Friend, L for Lovers, A for Affection, M for Marriage, and E for Enemy. We use different methods to calculate it. Below is the same concept program which I made. This program will tell you the love percentage between the couples, just saying. I’m presenting you the code.

import java.io.*;

class Love {
	public static void main(String args[]) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			System.out.println("Please enter name of boy");
			String s1 = br.readLine();
			System.out.println("Please enter name of girl");
			String s2 = br.readLine();
			int sum = 0, sum2 = 0;
			for (int i = 0; i < s1.length(); i++) {
				char ch = s1.charAt(i);
				int ascii = ch;
				sum = sum + ascii;
			}
			for (int i = 0; i < s2.length(); i++) {
				char ch = s2.charAt(i);
				int ascii = ch;
				sum2 = sum2 + ascii;
			}
			int total = sum + sum2;
			int lovepercentage = total % 100;
			System.out.println("love between " + s1 + " and " + s2 + " is "
					+ lovepercentage + "%");
		} catch (Exception e) {
			System.out.print("Love calculator exception");
		}
		Love.main(args);
	}
}





There can be many ways in which you can calculate, above was the simplest I tried, if anyone have any other idea, fire your comments.

Happy Coding !!!