dia de la semana

package diasemana; import java.util.Scanner; public class Diasemana { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); System.out.println("Escoja un numero del 1 al 7: " ); int num = entrada.nextInt(); switch (num){ case 1: System.out.println("Lunes"); break; case 2: System.out.println("Martes"); break; case 3: System.out.println("Miercoles"); break; case 4: System.out.println("Jueves"); break; case 5: System.out.println("Viernes"); break; case 6: System.out.println("Sabado"); break; case 7: System.out.println("Domingo"); break; default: System.out.println("No es una opcion"); break; } } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.