CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@Manish Goyal • 01 Oct, 2009
I hope most of you ceans
must use love calculator to calculate love percentage
here I am posting a code in java that will calculate love percentage
with your partner
//Program to calculate Love percentage

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");
}
}
}
5k views

Related Posts

@Kaustubh Katdare · May 7, 2014

Flipkart has announced the launch of Flipkart First - a premium customer subscription service that treats the users as VIPs. While there is no information available about the subscription charges,...
6k views

@Kaustubh Katdare · Jun 16, 2017

HCL Technologies is currently developing one of its major development centers in Nagpur at MIHAN. HCL's executives has confirmed that they'll be recruiting about 2000 engineers - half of which...
5.1k views

@vikas_cusat2005 · Mar 2, 2007

sir i m in btech second year civil engineering... i want to go for summer training or internship in the month of june or so... i request everones help because...
19.9k views

@Sudha Warad · Oct 25, 2011

Hi, can anybody please upload placement papers of SLK softwares with interview experience. Shortly SLK is coming to our college for recruiting, please upload it soon. Thank u all.
7.6k views

@Kaustubh Katdare · Feb 26, 2014

Meet 'Sketch Programming Language' : developed by engineers at MIT that promises to take out the 'tough' part out of writing code; and make life better for the developers. Sketch...
3.9k views