↑ Vote This Article
Here is another program from the series tricky code. Here I am going to show you how we can do Multiplication without using Multiply Operator *. Programs like this you will rarely get anywhere else.
Comment below to express your feeling and suggest me new idea for more tricky code.
Logic of the code:
First you give a try to think the logic.
Here is the answer,
Let a and b are two variables then c=axb. We take 9 as a and 8 as b then c=72.
In other word we are adding 9, 8 times or adding 9, 8 times, so simple logic. This is what I converted into programing.
Code:
}
Also read
C Program to Print HELLO without HELLO
Hope you liked my posts, give comments if you have any doubts…
———————————————————————————————————————————————————————————–
Tags: C Program, tricky code
Leave a comment