Sunday, 20 October 2013

Calculate your love percentage

Every love couple must try this program


import java.io.*;
class LovePercentage
{
String b,g;
void input()throws IOException
{
BufferedReader x=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter name of boy:");
b=x.readLine();
System.out.println("Enter name of girl");
g=x.readLine();
}
public static void main(String arg[])throws IOException
{
 LovePercentage obj=new LovePercentage();
obj.input();
int r=(int)(Math.random()*101);
System.out.print("\f");
System.out.println("Love Percentage of "+b+" and "+g+"="+r);
}
}

No comments:

Post a Comment