I was going through a programming class and was asked this tricky question which was left unanswered till the end of the class.
Question:
How can I multiply any input(Float,int etc) by 7,
without using the
*
operator
in TWO steps
.
If anyone can give me the answer for this question with the explanation , that would be very helpful.
With TWO STEPS I mean suppose you are running a loop (i=0;i<7;i++) in that case number of steps will be >2, also TYPE CONVERSION, DIVISION,ADDITION etc ( Counts for steps ).