Page 198 - CA_Blue( J )_Class10
P. 198
if(c > 0)
System.out.println(n + " is composite.");
else
System.out.println(n + " is not composite.");
break;
case 2:
System.out.print("Enter a number: ");
n = sc.nextInt();
while(n > 0){
r = n % 10;
if(s > r)
s = r;
n =n/10;
}
System.out.println("Smallest digit: " + s);
break;
default:
System.out.println("Wrong Input");
}
}
}
196196 Touchpad Computer Applications-X

