Created
June 17, 2019 19:27
-
-
Save bossiernesto/2ff351eb7a4127744fad72ac677c49a2 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
| import java.util.Scanner; | |
| public class Main { | |
| //package Main; | |
| public static void | |
| main(String[] args) { | |
| double area, perimetro; | |
| Scanner entrada = new Scanner | |
| (System.in); | |
| System.out.println("Hello World!"); | |
| //Leer àrea de cuadrado y devolver perímetro | |
| System.out.println("Ingrese área de un cuadrado"); | |
| area= entrada.nextInt(); | |
| perimetro= (Math.sqrt(area))*4; | |
| System.out.print("El perímetro del cuadrado es: " + perimetro); | |
| // Modulo | |
| System.out.println("modulo:" + 8 % 2); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment