Write a program that reads in two integers typed on the keyboard and outputs their sum, difference, and product. Must compile correctly in Eclipse. Here is what I have done, but its wrong.
#include
public static void main(String args[])
{
int num1,num2;
int sum,diff,prod
cout << "Please enter two integers" << endl;
cin >> num1 >> num2;
sum = num1 + num2;
diff = num1 - num2;
prod = num1 * num2;
cout << "the sum is " << sum << endl;
cout << "the difference is " << diff << endl;
cout << "the product is " << prod << endl;
return 0;
}
}