You are on page 1of 5

FACULTAD

ESCUELA PROFESIONAL

DOCENTE
FARAS

ASIGNATURA
PROGRAMACIN

ALUMNO

: INGENIERIA

: INGENIERIA DE SISTEMAS

: ING CIP. JONATHAN MERINO

: TCNICA DE

: CRUZ LOPEZ ANGIE

2015

1) package tarea_sesin_02;

import java.util.Scanner;

public class tarea_sesin_02_01 {

public static void main(String[] args){


int z, x ,y;
Scanner Entrada = new Scanner ( System.in);
System.out.print("Introduzca primer numero");
z = Entrada.nextInt();
System.out.print("Introduzca segundo numero");
x = Entrada.nextInt();
System.out.print("Introduzca tercer numero");
y = Entrada.nextInt();
if (z > x && x > y)
System.out.println(" Mayor es :" + z + "Medio es :" + x + "Menor es" + y);

else{

if ( z > y && y > x)


System.out.println(" Mayor es :" + z + "Medio es :" + y + "Menor es" +
x);

else {

if (x > z && z > y)


System.out.println(" Mayor es :" + x + "Medio es :" + z + "Menor es" + y);

else{

if (x > y && y > z)


System.out.println(" Mayor es :" + x + "Medio es :" + y + "Menor es" + z);

else{

if (y > z && z > x)


System.out.println(" Mayor es :" + y + "Medio es :" + z + "Menor es" + x);

else {

if (y > x && x > z)


System.out
.println(" Mayor es :" + y
+ " Medio es :" + x
+ " Menor es :" + z);

} }}}}

3)package tarea_sesin_02;

import java.util.Scanner;

public class tarea_sesin_02_02 {


public static void main(String[] args) {
Scanner m = new Scanner (System.in);
double nota, a=0, b=0,c=0,d=0, men=0, prom;
for(int n=0; n<=3; n++){
System.out.print("Ingrese la nota : ");
nota=m.nextDouble();
a=a+nota;

if (n == 1)
men = nota;
if(nota<men)
men=nota;
}
System.out.println("La menor nota y la que se elimina es: " + men);
prom = a/4;

System.out.println("Su promedio es: " + prom);

}
}

You might also like