martes, 12 de septiembre de 2017

ejercicio de cuadros de mensajes

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package poo_ejercicio_01;

import javax.swing.JOptionPane;

/**
 *
 * @author SEDUCA
 */
public class POO_ejercicio_01 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
         String mensaje="Ingrese su nombre:";
         String nombre="";
         int nota1=0;
         int nota2=0;
         int nota3=0;
         int promedio=0;
        
        nombre=JOptionPane.showInputDialog(null,mensaje);
       
        //JOptionPane.showMessageDialog(null, nombre,"su nombre es:",1);
       
        mensaje="Ingrese la nota numero 1:";
        nota1=Integer.parseInt(JOptionPane.showInputDialog(null,mensaje));
        mensaje="Ingrese la nota numero 2:";
        nota2=Integer.parseInt(JOptionPane.showInputDialog(null,mensaje));
        mensaje="Ingrese la nota numero 3:";
        nota3=Integer.parseInt(JOptionPane.showInputDialog(null,mensaje));
        promedio=(nota1+nota2+nota3)/3;
       
       
       
        JOptionPane.showMessageDialog(null,"El Alumno: " + nombre + " tiene un promedio de:" + promedio);
        /*
        int seleccion=0;
        do{
            seleccion=JOptionPane.showOptionDialog(null,"¿Desea continuar?", "seleccion",
            JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,new Object[]{"si","no"},null);
       
       
        }while(seleccion==0);
        */
    }
   
}

No hay comentarios:

Publicar un comentario

Los mail de oulook no se pueden reenviar.

 cuando en el asunto poseen un caracter especial por ejemplo @#$ los correos no salen y no te muestra ningun correo de rebote, especialmente...