- 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; }
1 ответ
+ 2
you have already posted this.
dont double post