Smallest N digit number which is a multiple of 5 | C ++ implementation of the approach ; Function to return the smallest n digit number which is a multiple of 5 ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int smallestMultiple ( int n ) { if ( n == 1 ) return 5 ; return pow ( 10 , n - 1 ) ; } int main ( ) { int n = 4 ; cout << smallestMultiple ( n ) ; return 0 ; }