write a program to input a number and print whether it is a two digit number or not.In java
Answers
Answered by
1
Programming Example
- import java.util.*;
- class TwoDigitSpecial.
- {
- public static void main(string arr[])
- {
- Scanner sc=new Scanner(System. in);
- int n,f,l;
- System.out. println(“Enter a 2 digit number”);
Answered by
1
Answer:
import java.io.*;
class test1
{public static void main(String ag[]) throws Exception
{ DataInputStream ob= new DataInputStream(System.in);
System.out.println("Enter Number");
int a=Integer.parseInt(ob.readLine());
if(a/10<10&&a/10>1)
System.out.println("A two digit number");
else
System.out.println("Not a two digit number");
}}
please thank if it helps you
and mark it as brainliest
please f0ll0w me
Similar questions