Log in

View Full Version : Teen or not


Navin singh
Dec 26, 2016, 10:54 PM
We'll say that a number is "teen" if it is in the range 13 to 19 inclusive. Given 2 integer values, print the number that is the teen range. Sample Input: 12 14 Sample Output: 12 and 14 both are teen numbers Sample Input: 21 25 Sample Output: 21 and 25 both are not teen numbers Sample Input: 17 89 Sample Output: 17 is a teen number Template: import java.util.*; public class Program3 { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); //Write your code here } }

Fr_Chuck
Dec 27, 2016, 05:21 PM
Teen ( is not a real number) it is a term , that refers to the numbers 13 to 19.

Wondergirl
Dec 27, 2016, 05:28 PM
Sample Output: 12 and 14 both are teen numbers
12 is NOT a teen number.