JAVA PROGRAM CODE :
import java.io.*;
import java.io.*;
import java.math.*;
class Bayes
{ BufferedReader sc=new BufferedReader(newInputStreamReader(System.in));
int i;
double y1,y2;
double c=0.0,c1=0.0,c3=0.0,c4,c5=0.0,c6;
String a[][]={{"y","h","n","f","n"},{"y","h","n","e","n"},{"m_a","h","n","f","y"},{"s","m","n","f","y"},{"s","l","y","f","y"},{"s","l","y","e","n"},{"m_a","l","y","e","y"},{"y","m","n","f","n"},{"y","l","y","f","y"},{"s","m","y","f","y"},{"y","m","y","e","y"},{"m_a","m","n","e","y"},{"m_a","h","y","f","y"},{"s","m","n","e","n"},};
void start1() throws Exception
{
System.out.println("Enter the conditions to see whether can buy computer or not ");
System.out.println("Enter age : ");
String x1=sc.readLine();
System.out.println("Enter income : ");
String x2=sc.readLine();
System.out.println("Enter student y or n: ");
String x3=sc.readLine();