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
| public enum Escala { | |
| FAHRENHEIT, CELSIUS, KELVIN | |
| } |
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
| public class Cilindro { | |
| private Double altura; | |
| private Circulo base; | |
| public void setAltura(Double altura) { | |
| this.altura = altura; | |
| } | |
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
| #!/bin/bash | |
| pipo=`ps aux | grep pipo | wc -l` | |
| if [ "$pipo" = "1" ] | |
| then | |
| echo "yeah!"; | |
| else | |
| echo "ouch!"; | |
| fi |
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
| function esCUITValida(inputValor) { | |
| inputString = inputValor.toString() | |
| if (inputString.length == 11) { | |
| var Caracters_1_2 = inputString.charAt(0) + inputString.charAt(1) | |
| if (Caracters_1_2 == "20" || Caracters_1_2 == "23" || Caracters_1_2 == "24" || Caracters_1_2 == "27" || Caracters_1_2 == "30" || Caracters_1_2 == "33" || Caracters_1_2 == "34") { | |
| var Count = inputString.charAt(0) * 5 + inputString.charAt(1) * 4 + inputString.charAt(2) * 3 + inputString.charAt(3) * 2 + inputString.charAt(4) * 7 + inputString.charAt(5) * 6 + inputString.charAt(6) * 5 + inputString.charAt(7) * 4 + inputString.charAt(8) * 3 + inputString.charAt(9) * 2 + inputString.charAt(10) * 1 | |
| Division = Count / 11; | |
| if (Division == Math.floor(Division)) { | |
| return true | |
| } |
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
| function validarLargoCBU(cbu) { | |
| if (cbu.length != 22) { return false } | |
| return true | |
| } | |
| function validarCodigoBanco(codigo) { | |
| if (codigo.length != 8) { return false } | |
| var banco = codigo.substr(0,3) | |
| var digitoVerificador1 = codigo[3] | |
| var sucursal = codigo.substr(4,3) |
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 ar.edu.untref.pruebas; | |
| public class Calculadora { | |
| public int contarDivisores(int numero) { | |
| if (numero <= 0) { | |
| Error numeroNoValido = | |
| new Error("El número debe ser mayor a cero"); | |
| throw numeroNoValido; | |
| } |
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 ar.edu.untref.pruebas; | |
| public class CajaDeAhorros { | |
| private String titular; | |
| private double saldo = 0.0; | |
| public CajaDeAhorros(String titular) { | |
| this.titular = titular; | |
| } |
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 ar.edu.untref.pruebas; | |
| public class Nota { | |
| private int nota; | |
| public Nota(int nota) { | |
| if (nota >=0 && nota <=10) { | |
| this.nota = nota; | |
| } else { |
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 ar.edu.untref.lp1; | |
| public class DiasLluviosos { | |
| private int[] lluviasDiarias = new int[30]; | |
| public void setLluviaDiaria(int dia, int lluviaDiaria) { | |
| if (dia < 1 || dia > 30 ) { | |
| throw new Error("El mes tiene entre 1 y 30 días"); | |
| } | |
| this.lluviasDiarias[dia - 1] = lluviaDiaria; |
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 ar.edu.unlam.tallerweb; | |
| public class Adivinanza { | |
| private Integer numero; | |
| public Adivinanza(Integer numero) { | |
| this.numero = numero; | |
| } | |