Computer Science, asked by polyghosh33, 2 months ago

wap in java to assume a number and check that it is 2 digit number or not. ​

Answers

Answered by atrs7391
4

package Brainly_Answers;

import java.util.Scanner;

class test

{

   public static void main (String[]args)

   {

       Scanner sc = new Scanner(System.in);

       System.out.println("Enter number: ");

       double n = sc.nextDouble();

       if (n>9 && n<100) {

           System.out.println("Number TWO-DIGIT-NUMBER. ");

       }

       else {

           System.out.println("Number is not TWO-DIGIT-NUMBER. ");

       }

   }

}

Similar questions