|
| |||||||||
| Tags: java, print, programming, square root, symbol |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Square Root Symbol In Java
Hello, I am currently creating a small program in the java. And while creating the program which can simply take square root of the number provided by you. But my problem is I want to simply provide the square root symbol on the command prompt in java while asking the user about it. If anyone know how to perform it then please provide me help regarding it. |
|
#2
| ||||
| ||||
| Re: Square Root Symbol In Java
Hello, I am not having knowledge in programming but, I think if you want to make use of the Square Root Symbol in java, then you may need to follow the steps below:
|
|
#3
| ||||
| ||||
| Re: Square Root Symbol In Java
It is quiet simple to make use of the Square root symbol in java and you will able to get it. It will simply make use of the ASCII value of it. Code: public class Squreroot
{
public static void main(String[]args)
{
System.out.println("\u221A");
}
} |
|
#4
| ||||
| ||||
| Re: Square Root Symbol In Java
If you want to Squre root the number in java then you must make use of the code below. But, if you want to make use of the Square Root Symbol then, I don't think it will be possible in java. Code: public class SquareRoot
{
public static void main(String[] args)
{
System.out.println(Math.sqrt(25));
System.out.println(Math.sqrt(255));
}
} |
|
#5
| ||||
| ||||
| Re: Square Root Symbol In Java
Hello, I have checked on internet and then I come to know that if you want to use any type of symbol in your java code then you simply make use of the Ascii code of that particular symbol. So, just make use of it and you will able to solve your problem. You can get the ascii values from internet and make use of it for your use. |
|
#6
| ||||
| ||||
| Re: Square Root Symbol In Java
I have got the code which can simply help you to provide the Squre root symbol in the JOptionPane's message box. It will help you to get the solution. Code: import javax.swing.JOptionPane;
public class Testing
{
public static void main(String[]args)
{
JOptionPane.showMessageDialog(null,"\u221A");
}
} |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Square Root Symbol In Java" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I find square root using c program? | ScarFace 01 | Software Development | 5 | 06-01-2010 02:16 PM |
| Error in Java file: Cannot find symbol | Jayden | Software Development | 5 | 02-09-2009 09:48 AM |
| Java 11 cannot find symbol | Wyvern | Software Development | 3 | 02-09-2009 02:12 AM |
| Square root and Visual C++ compiler | Luis234 | Software Development | 4 | 25-04-2009 01:02 AM |
| How to resolve error of "Root hints list has invalid root hint ser | Eggy | Active Directory | 3 | 13-10-2007 07:16 PM |