Find the largest N digit multiple of N | Java program to find largest multiple of N containing N digits ; Function to find the largest N digit multiple of N ; Driver code
import java . util . * ; class GFG { static void smallestNumber ( int N ) { System . out . print ( N * Math . floor ( ( Math . pow ( 10 , N ) - 1 ) / N ) ) ; } public static void main ( String args [ ] ) { int N = 2 ; smallestNumber ( N ) ; } }