Search the web
Custom Search

Price: Rs.225 Buy from

Java Language is a new approach for the school students. The matter has been explained in simple language. Programs are user friendly.Each chapter contains a number of solved examples, a set of objectives and short questions followed by long questions.

Author - Vijay Kumar Pandey
List Price: Rs.300 Price: Rs.288 Buy from

This book is for beginning programmers studying the java language. The book teaches object oriented principles, using the BlueJ development environment.
Price: Rs.280 Buy from

Author - Vijay Kumar Pandey & Dilip Kumar Dey

Flipkart Deal of the Day

Program Based On Inbuilt Function

WAP to accept two numbers find the largest and print its square root. And print the square of the smaller one.


public class inbuilt2
public static void main(String args[])throws IOException
InputStreamReader read = new InputStreamReader(;
BufferedReader in = new BufferedReader(read);
double square=0;

System.out.println("Enter the first number");
int one=Integer.parseInt(in.readLine());
System.out.println("Enter the second number");
int two=Integer.parseInt(in.readLine());

int large=Math.max(one,two);
int less = Math.min(one,two);
double squareroot=Math.sqrt(large);

System.out.println("The square root of the larger number is = "+squareroot);
System.out.println("The square of the smaller number is = "+square);

Program Execution:

Enter the first number
Enter the second number
The square root of the larger number is = 10.0
The square of the smaller number is = 36.0
Post a Comment

Search the web
Custom Search

All Rights Reserved