Multiply a number by 15 without using * and / operators | Java implementation of the approach ; Function to return ( 15 * N ) without using ' * ' or ' / ' operator ; prod = 16 * n ; ( ( 16 * n ) - n ) = 15 * n ; Driver code
class GFG { static long multiplyByFifteen ( long n ) { long prod = ( n << 4 ) ; prod = prod - n ; return prod ; } public static void main ( String [ ] args ) { long n = 7 ; System . out . print ( multiplyByFifteen ( n ) ) ; } }