Advertisement
Guest User

Untitled

a guest
May 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Condicionalbooleano {
  2.    
  3.     public static void main (String [] args)
  4.     {
  5.         int horas = 2, minutos = 1, segundos = 14;
  6.        
  7.         System.OUT.println("Quedan " +
  8.                 String.valueOf(horas) + " " + ((horas>1)?"horas":"hora") + " " +
  9.                 String.valueOf(minutos) + " " + ((minutos>1)?"minutos":"minuto") + " " +
  10.                 String.valueOf(segundos) + " " + ((segundos>1?"segundos":"segundo"))
  11.                 );
  12.     }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement