How to do padding to input giving to encrypt using AES algorithm if the input is less than 128 bits? I need to encrypt a decimal number such as 10.
First you need to think about what range of numbers you want to encrypt. You need to create a scheme that is secure for at least the numbers within this range. Make sure you don't encrypt any other numbers.
Then you need to specify an encoding of the number to binary. It's probably easiest to make sure you encode to octets instead of bits. Handling odd bits is tricky at best, especially since most crypto API's are defined for bytes instead of bits. A good scheme would be to encode the number as signed or unsigned big endian (network order) value with a static size of 32 bits / 4 bytes.
Now you need to decide on an encryption mode for AES. You may or may not need a mode that uses an IV, and you may or may not need an authenticated scheme. It's hard to tell without any other requirements.
If you've chosen ECB or CBC then you need to choose a padding scheme as well. The most common one is PKCS#7 compatible padding. If you're still working with bits then bit padding is probably better.
Alternatively to choosing a mode and padding you may want to have a look at format preserving encryption or FPE.