Help!

I'm trying to get all the results to add up and equal one number. Something is wrong.

#include <iostream>
using namespace std;

int main()
{
int a,b,c;

cout<<"Enter any 2 integers\n";
cin>>a>>b>>c;
cout<<"the sum of integers you have entered is equal to c"<<(a+b=c)<<endl;
cout<<"the product of the integers you have entered is equal to c"<<(a*b=c)<<en\$
cout<<"the quotient of the integers you have entered is equal to c"<<(a/b=c)<<e\$
cout<<"the difference of the integers you have entered is equal to c"<<(a-b=c)<\$
cout<<"the sum of all the results you have entered is equal to c"<<(c+c+c+c)<<e\$

cout<<"\nThe program is over\n";

}
the end didn't copy write but lines 10-14 all end in endl;
Last edited on
closed account (jwkNwA7f)
You are asking to enter a number for c too, not just a and b.

`<\$`
Should have two '<'s

Also, what are these?:
en\$
e\$
\$
e\$

Hope this helped!

Last edited on
 ``1234567891011121314151617181920212223242526`` ``````#include using namespace std; int main() { double a, b, c = 0; cout << "Enter any 2 integers: " << endl; cin >> a >> b; cout << "the sum of integers you have entered is equal to " << (c += a + b, a + b) << endl; cout << "the product of the integers you have entered is equal to " << (c += a * b, a * b) << endl; cout << "the quotient of the integers you have entered is equal to " << (c += a / b, a / b) << endl; cout << "the difference of the integers you have entered is equal to " << (c += a - b, a - b) << endl; cout << "the sum of all the results you have entered is equal to " << c << endl; cout << endl << "The program is over" << endl; return 0; }``````
@Josue Molina: What does `(c += a + b, a + b)` do?
We can directly do `cout << "the sum of integers you have entered is equal to " << a + b<< endl;` right?
 ``1234`` ``````cout<<"the sum of integers you have entered is equal to c" <<(a+b) << endl; cout<<"the product of the integers you have entered is equal to c" <<(a*b) << endl; cout<<"the quotient of the integers you have entered is equal to c" <<(a/b) << endl; cout<<"the difference of the integers you have entered is equal to c" <<(a-b) << endl;``````