a java program to check wether a number is 2 digit or not without using scanner
Answers
Answered by
0
class program
{
public static void main (int n)
{
int i,c=0;
for (i=n; n>0; n/=10)
c+=1;
if (c==2)
System.out.println("two digited");
else
System.out.println( "not a two figured number");
}
}
#Mark brainliest
{
public static void main (int n)
{
int i,c=0;
for (i=n; n>0; n/=10)
c+=1;
if (c==2)
System.out.println("two digited");
else
System.out.println( "not a two figured number");
}
}
#Mark brainliest
Similar questions