+ 3
Write a code to get two positive values from user and multiply them just by sum and sub!!!
this one is not a Q it's a challenge😄
7 Réponses
+ 13
As your question is stated, the values are supposed to be taken from user. If the input variables are x and y, then just keep adding x with 0 y times!
+ 12
Well suppose you need to calculate 3*4
keep adding 3 with 0 four times
0+3+3+3+3
use loop to solve this problem
+ 4
Should the 2 values be integers?
0
we don't know what are these valuse😄
0
you have to get those put those valuse in a loop,then in every loop decrease one of the valuse one number and sum another one with itself until the first one reach to 0like this:
cin>>n
cin>>m
for(int m,m>0,m--;)
{n=n+n}
0
I've done it; n Python. Check my profile to see the code (if you find it between all my hundreds of other codes)
0
yes they should be integers