Wednesday, May 30, 2012

/*PROGRAM TO FIND SQUARE ROOT USING MATH FUNCTIONS*/

/*PROGRAM TO FIND SQUARE ROOT USING MATH FUNCTIONS*/

PROGRAM: 

import java.io.*;
import java.lang.math*;
class square
{
         public static void main(string args[ ])
         {
               double x=5,y;
                y=math.sqrt(x);
                system.out.println("SQUARE ROOT="+y);
          }
}

SAMPLE OUTPUT:

SQUARE ROOT=2.2360


TRY YOURSELF:3

1)Try out the program program to find square root of the number(decimal).

Note:Answer will be published after 24 hours at solution page


No comments:

Post a Comment

Animated Social Gadget - Blogger And Wordpress Tips