Advertisement
Guest User

Untitled

a guest
Aug 15th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. public class elseif{
  2. public static void main(String[] args)
  3. {
  4. int x=10,y=20,z=18;
  5. if(x>=y&&z<=x)
  6. {
  7. System.out.println(x+"is the largest");
  8. }
  9. else if(y>=x&&y>=z)
  10. {
  11. System.out.println(y+"is the largest");
  12. }
  13. else
  14. {
  15. System.out.println(z+"is the largest");
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement