class samplepaperq3c{
public static void main(String[]args){
double salary = 0;
double savings = 0;
int age = 0;
do
{
do
{
System.out.println("Please enter your current age");
age=Keyboard.readInt();
System.out.println(""); //keeps the console screen clear
System.out.println("Please enter your current Salary");
salary=Keyboard.readDouble();
System.out.println(""); //keeps the console screen clear
System.out.println("Please enter your current savings approximately");
savings=Keyboard.readDouble();
System.out.println(""); //keeps the console screen clear
if(age >= 25 && salary >= 40000 && savings >=85000)
{
System.out.println("you are eligible for a morgage");
}
else
{
System.out.println("You are not eligible for a morgage");
}
}while (age > 25 && salary > 40000 && savings >=85000); //end of do while loop
System.out.println("thank you for using this program");
System.out.println(""); //keeps the console screen clear
}while(salary!= 0); //end of do while loop
}//end of main method
}//end of class
Thanks for your reply. I just did this up. It seems to do the job that they are asking. how would you approach this or do you think this is ok