Escolar Documentos
Profissional Documentos
Cultura Documentos
PROYECTO: JARREGLOS
package jarreglos;
public class JArreglos {
public static void main(String[ ] args) {
int unArray[ ];
**********************************************************************
**********************
03.
// Entrada de datos
Scanner teclado = new Scanner(System.in);
System.out.print("Introduzca el primer nmero: ");
a = teclado.nextDouble();
System.out.print("Introduzca el segundo nmero: ");
b = teclado.nextDouble();
System.out.print("Introduzca el tercer nmero: ");
c = teclado.nextDouble();
// Proceso
System.out.printf("%.2f %n",(a*b)/c);
if (b==5){
System.out.println("La Operacin es incorrecta");
cond=false;
}
else {
System.out.println("La Operacin es Correcta");
cond=true;
}
if (c < a) {
//Salida de Datos
System.out.println("La respuesta es Verdadera");
}
else{
//Variables
int n1,n2,n3,mayor,inter,menor;
//Entrada
Scanner teclado = new Scanner(System.in);
System.out.print("Numero 1:
");
n1 = teclado.nextInt();
System.out.print("Numero 2:
");
n2 = teclado.nextInt();
System.out.print("Numero 3:
n3 = teclado.nextInt();
//Proceso
if(n1 > n2 && n1 > n3){
mayor = n1;
}else{
if(n2 > n1 && n2 > n3){
mayor = n2;
} else {
");
mayor = n3;
}
}
If (n1 < n2 && n1 < n3){
menor = n1;
} else {
If (n2 < n1 && n2 < n3){
menor = n2;
} else {
menor = n3;
}
}
inter = (n1 + n2 + n3) - (mayor + menor);
//Salida
System.out.println("");
System.out.println("Mayor: " + mayor);
System.out.println("Intermedio: " + inter);
System.out.println("Menor: " + menor);
}
}
UN REGALO
1. NUNCA CONSIDERES EL ESTUDIO COMO UNA OBLIGACIN, SINO COMO
UNA OPORTUNIDAD PARA PENETRAR EN EL BELLO Y MARAVILLOSO
MUNDO DEL SABER. Albert Einstein (1879-1955)
2. DEBEN VIVIR PARA ESTUDIAR, Y NO ESTUDIAR PARA VIVIR.
Sir Francis Bacon (1561-1626)