Advertisement
joseleonweb

Untitled

Aug 21st, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. public class ValorMaxim {
  2.  
  3.   public static final double PRIMER_VALOR = 15.5;
  4.  
  5.   public static final double SEGON_VALOR = 9.35;
  6.  
  7.   public static void main (String[] args) {
  8.  
  9.     if (PRIMER_VALOR >= SEGON_VALOR) {
  10.       System.out.println("El màxim és " + PRIMER_VALOR);
  11.     } else if (PRIMER_VALOR < SEGON_VALOR) {
  12.       System.out.println("El màxim és " + SEGON_VALOR);
  13.     }
  14.   }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement