Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Teen or not (https://www.askmehelpdesk.com/showthread.php?t=829538)

  • Dec 26, 2016, 10:54 PM
    Navin singh
    Teen or not
    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 } }
  • Dec 27, 2016, 05:21 PM
    Fr_Chuck
    Teen ( is not a real number) it is a term , that refers to the numbers 13 to 19.
  • Dec 27, 2016, 05:28 PM
    Wondergirl
    Quote:

    Sample Output: 12 and 14 both are teen numbers
    12 is NOT a teen number.

  • All times are GMT -7. The time now is 02:43 PM.