X hits on this document

89 views

0 shares

0 downloads

0 comments

39 / 46

© S. Uchitel, 2004

39

... to Java

import kenya.io.InputReader;

public class Bigger {

public static void main(String [] args) {

 System.out.println("Type in your 2 numbers -> ");

 System.out.println("The winner is " +

bigger(InputReader.readInt(), InputReader.readInt()));

}

static int bigger(int a, int b){

//post: returns the larger of the 2 values if (a > b) {return a;}

else {return b;}

}

}

Document info
Document views89
Page views89
Page last viewedFri Dec 02 22:29:07 UTC 2016
Pages46
Paragraphs816
Words2901

Comments