Facebook
From Cute Lizard, 3 Years ago, written in Java.
This paste is a reply to 18 answer 2 NoamDadon from Scanty Motmot - view diff
Embed
Download Paste or View Raw
Hits: 108
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner input = new Scanner(System.in);
  9.         int num1, num2, num3;
  10.         num1 = input.nextInt();
  11.         num2 = input.nextInt();
  12.         num3 = input.nextInt();
  13.         int max = num1;
  14.  
  15.         if (num1 < num2 && num2 > num3) {
  16.             max = num2;
  17.         }
  18.         else if (num2 < num3 && num3 > num1){
  19.             max = num3;
  20.         }
  21.  
  22.         System.out.println("the max number is " + max);
  23.  
  24.     }
  25. }

Replies to Re: 18 answer 3 NoamDadon rss

Title Name Language When
Re: Re: 18 answer 4 NoamDadon Commodious Water Vole java 3 Years ago.