Why isnt it work properly? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Why isnt it work properly?

it should print A and B, where a+b=a*b. For example, 2+2=2*2 or 1,5*3=1,5+3 #include <iostream> using namespace std; int main() { double a,b,sum,prod; for (a=0.1; a<10; a=a+0.1){ for (b=0.1; b<10; b=b+0.1){ sum=a+b; prod=a*b; if (sum==prod){ cout << a << "*" << b << "=" << a << "+" << b << endl; } } } return 0; }

18th Nov 2016, 11:56 AM
Maxikadze
1 Answer
+ 2
you have already posted this. dont double post
18th Nov 2016, 12:04 PM
Roland