Advertisement
keviinrm7

PRIMER EJERCICIO EN CLASE

May 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package pkg2.pkg1;
  7. import java.util.Scanner;
  8. /**
  9. *
  10. * @author lab5-pc38
  11. */
  12. public class Main {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. // TODO code application logic here
  19. String nombrecompleto, cedula, sexo;
  20. int edad;
  21. double peso,estatura;
  22.  
  23. Scanner teclado = new Scanner(System.in);
  24. System.out.println("Ingrese su nombre completo: ");
  25. nombrecompleto = teclado.nextLine();
  26. System.out.println("Ingrese su cedula: ");
  27. cedula = teclado.next();
  28. System.out.println("Ingrese su edad");
  29. edad = teclado.nextInt();
  30. System.out.println("Ingrese su sexo ");
  31. sexo = teclado.next();
  32. System.out.println("Ingrese su peso: ");
  33. peso = teclado.nextDouble();
  34. System.out.println("Ingrese su estatura ");
  35. estatura = teclado.nextDouble();
  36. System.out.println("Sus datos son:" +nombrecompleto);
  37. System.out.println("Sus datos son:" +cedula);
  38. System.out.println("Sus datos son:" +edad );
  39. System.out.println("Sus datos son:" +sexo);
  40. System.out.println("Sus datos son:" +estatura);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement