Created
October 20, 2015 11:13
-
-
Save edinak1/bcae239b27ebdb2f4bbe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package metod; | |
| public class MetodSquare { | |
| public static void main(String[] args) { | |
| double number=2.0; | |
| System.out.println(number+"^2"+"="+square(number)); | |
| System.out.println(number+"^4"+"="+square(square(number))); | |
| System.out.println(number+"^8"+"="+square(square(square(number)))); | |
| } | |
| static double square(double number) | |
| { | |
| return number*number; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment