Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 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 Tarea2;
  7. import java.util.Scanner;
  8.  
  9. /**
  10. *
  11. * @author CIDCA
  12. */
  13. public class Tarea2 {
  14.  
  15. /**
  16. * @param args the command line arguments
  17. */
  18. public static void main(String[] args) {
  19. // Notas del Año
  20. Scanner teclado = new Scanner (System.in);
  21.  
  22. int n1, n2, n3, n4, n5;
  23.  
  24. System.out.println("Digite la primera nota: ");
  25. n1 = teclado.nextin( );
  26.  
  27. System.out.println("Digite la segunda nota: ");
  28. n2 = teclado.nextin( );
  29.  
  30. System.out.println("Digite la tercer nota: ");
  31. n3 = teclado.nextin( );
  32.  
  33. System.out.println("Digite la cuarta nota: ");
  34. n4 = teclado.nextin( );
  35.  
  36. System.out.println("Digite la quinta nota: ");
  37. n5 = teclado.nextin( );
  38.  
  39. if ((n1+n2+n3+n4+n5)>75)
  40. {
  41. System.out.println("El estudiante pasó el año");
  42. }
  43. else
  44. System.out.println("El estudiante perdió el año");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement