class NewRoot {
public static void main(String[] args) {
int number = 100; // this is where you put what number you want
// for the program to calculate
if (args.length > 0) {
number = Integer.parseInt(args[0]);
}
System.out.println("The square root of "
+ number // this part neatly puts the square root into a sentence
// for you =D
+ " is "
+ Math.sqrt(number) );
}
}
Edited by Orjan, 08 August 2010 - 04:59 AM.


Sign In
Create Account


Back to top









