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 javax.swing.*; | |
/** | |
* programa que calcula 2 numeros | |
* enteros ingresados por el usuario | |
* @author DiegoFenandoEcheverry (Godie007) | |
*/ | |
public class Sumatoria { |
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 Ejemplos { | |
public static void main(String args[]){ | |
String cadena = "los nenes"; | |
if(cadena.length() >= 20){ | |
System.out.println("la cadena tiene 20 o mas caracteres"); | |
} | |
else{ | |
System.out.println("la cadena tiene menos de 20 caracteres"); | |
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 com.example; | |
import javax.swing.JOptionPane; | |
public class MinimoComunMultiplo { | |
public static void main(String[] args) | |
{ | |
int a, b, t, t1, x; | |
a = Integer.parseInt(JOptionPane.showInputDialog("A")); |
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 Ejercicio1 { | |
public static void main(String[] args) { | |
int contador = 0; | |
int contador2 = 0; | |
int importe = 0; | |
int users = Integer.parseInt(JOptionPane.showInputDialog("Numero de Usuarios")); | |
for (int i = 0; i < users; i++) { | |
int sueldo1 = Integer.parseInt(JOptionPane.showInputDialog("sueldo")); | |
boolean valido = 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
public class Ejercicio5 { | |
public static void main( String args[] ){ | |
int cuantos = 5; | |
int primero = 1; | |
int segundo = 3; | |
metodo(cuantos, primero, segundo); | |
} | |
public static void metodo(int cuantos,int primero,int segundo) { |
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 static int metodo() { | |
int mayor = 0; | |
for (int i = 1; i <= 5; i++) { | |
int entradaUsuario = Integer.parseInt(JOptionPane.showInputDialog("")); | |
if (entradaUsuario > mayor) { | |
mayor = entradaUsuario; | |
} | |
} | |
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 Ensayo { | |
public static void main(String[] args) { | |
String inv = ""; | |
System.out.println(convertir("1234")); | |
} | |
public static String convertir(String num) { | |
String inv = ""; | |
for (int i = num.length() - 1; i >= 0; i--) { | |
inv += num.charAt(i); | |
} |
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 trabajo; | |
import javax.swing.JOptionPane; | |
/** | |
* Clase principal del proyecto. | |
*/ | |
public class Proyecto { | |
/** |
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 Trabajo; | |
public class DecimalAOctal { | |
public static void main(String[] args) { | |
octalADecimal("765"); | |
} | |
public static void octalADecimal(String base) { | |
String cadenaInver = ""; | |
int b = 0; | |
int c = 0; |
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 Trabajo; | |
public class SumarDecimal { | |
public static void main(String[] args) { | |
sumaDecimal(); | |
} | |
private static void sumaDecimal() { | |
String primerOperando = "5"; | |
String segundoOperando = "9"; |
OlderNewer