Remove the specific number in java
Remove the specific number from the given input i/p:1200 number to remove:2 output: 100 class Remove { public static void main(String args[]) { int n=1200,r=2,a,s=0,b=1; while(n!=0)//1 { a=n%10;//a=1 if(a!=r)//1!=2(t) { s=s+b*a;//0+100*1–>s=100 b=b*10;//b=1000 } n=n/10;//0 } System.out.println(s);//100 } } ✅ Java Program: Remove a Specific Digit from Input import java.util.Scanner; […]