Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Program {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int input;
- System.out.println("Give me a number: ");
- input = sc.nextInt();
- if(isSmall(input)){
- System.out.println("That's a small number.");
- }
- else{
- System.out.println("That's not so small.");
- }
- }
- public static boolean isSmall(int i){
- if(i <= 5)
- return true;
- else
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment