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
| 1. en una epresa trabajan n° empreados cuyos sueldos oscilan entre 100 y 500 pesos, realizar un programa que lea los sueldos que cobra cada empleado | |
| e informe cuantos empleados cobran entre 100 y 300 y cuantros cobran mas de 300. ademas el programa debera informar el importe que gasta la empresa | |
| en sueldos al personal. | |
| 2. desarrolla un programa que permita cargar numeros enteros y luego nos informe cuantos valores fueron pares cuantos impares utilizar el operador | |
| de modulo | |
| 3. leer un numero y mostrar su cuadrado, repetir el procesa hasta que se introdusca un numero negativo | |
| 4. pedir numeros hasta que se teclee un numero negativo y mostrar cuantos numeros se han introducido |
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 Empresa; | |
| import javax.swing.JOptionPane; | |
| public class Empresa { | |
| public static void main(String[] args) { | |
| int contador1 = 0; | |
| int contador2 = 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 Empresa; | |
| import javax.swing.JOptionPane; | |
| public class Empresa { | |
| public static void main(String[] args) { | |
| { | |
| String nombre1, sexo1; | |
| int i, contador1, contador, contador2; | |
| char sexo, nomb; |
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")); | |
| if (sueldo1 <= 300 && sueldo1 >= 100) { |
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 java.io.*; | |
| import java.text.*; | |
| public class Proyecto { | |
| public static void main(String []inferno)throws IOException | |
| { | |
| int res,num,opc; | |
| String resultado; | |
| BufferedReader in=new BufferedReader (new InputStreamReader(System.in)); |
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 java.io.*; | |
| import javax.swing.*; | |
| public class Proyecto { | |
| // el metodo main inicia | |
| public static void main(String arg[]) throws IOException { | |
| String NumADividir; |
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.JOptionPane; | |
| public class Ejercicio1 { | |
| private static int metodo(int a) { | |
| int b = 0; | |
| for (int i = 1; i <= a; i++) { | |
| int mod = i*3; | |
| b += mod; | |
| }return b; |
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; | |
| System.out.println(metodo(cuantos, primero, segundo)); | |
| } | |
| public static int metodo(int cuantos,int primero,int segundo) { | |
| for(int i = 0; i < cuantos; 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
| import javax.swing.JOptionPane; | |
| public class Ejercicio6 { | |
| public static void main(String[] args) { | |
| int a = Integer.parseInt(JOptionPane.showInputDialog("")); | |
| int b = Integer.parseInt(JOptionPane.showInputDialog("")); | |
| int c = Integer.parseInt(JOptionPane.showInputDialog("")); | |
| System.out.println(metodo(a, b, c)); | |
| } | |
| public static int metodo(int a, int b, int c) { |
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; | |
| } | |
| }return mayor; | |
| } |