Está en la página 1de 1

public class promedioalumno{

public static void main(String args[]){


String nombre, apellido;
double nota1, nota2, nota3, promedio;
scanner teclado=new scanner(System.in);
System.out.print("Ingrese Nombre ");
System.out.print("Ingrese primer nota:");
nota1=teclado.nextInt();
System.out.print("Ingrese segunda nota:");
nota2=teclado.nextInt();
System.out.print("Ingrese tercer nota:");
nota3=teclado.nextInt();
int promedio=(nota1 + nota2 + nota3) / 3;
System.out.print("Estudiante "+nombre+"su nota promedio es:"+);
}
}
public class Cambiodemoneda{
public static void main (String[]args){
int resp;
float cant;
double resultado;
System.out.println("CANTIDAD A CONVERTIR?");cant=
Leer.datoFloat();
System.out.println("\n 1)CONVERTIR A Soles");
System.out.println(" 2)CONVERTIR A DOLARES");
System.out.println(" Escoje la opcion ");resp=Le
er.datoInt();
if(resp==1)
{
resultado=cant*2.68;
}
else
{
resultado=cant/2.68;
}
System.out.println(".\n\nEL RESULTADO ES "+result
ado);
}
}
CANTIDAD A CONVERTIR?
2
1)CONVERTIR A Soles
2)CONVERTIR A DOLARES
Escoje la opcion
1
.
EL RESULTADO ES

También podría gustarte