I've compiled, but I don't know what the problem is.
I haven't had any problems with my other programming, but this one seems to stump me. The program asks to "write a program that asks the user to enter two numbers, obtains the two numbers and prints the sum, product, difference, and quotient of the two numbers." I understand write it if it asked for the "If" statements, but I'm not sure how to program all four functions in the same file. Here is what I have. Any help will be greatly appreciated!
// Ex. 1.23: ex123.cpp
// Sum, difference, product, and quotient program
#include <iostream>
int main()
{
int integer1, integer2, sum; // declaration
integer1, integer2, difference;
integer1, integer2, product;
integer1, integer2, quotient;
std::cout << "Enter first integer\n"; // prompt
std::cin >> integer1; // read an integer
std::cout << "Enter second integer\n"; // prompt
std::cin >> integer2; // read an integer
sum = integer1 + integer2; // assignment of sum
std::cout << "Sum is " << sum << std::endl; // print sum
difference = integer1 - integer2; // assignment of difference
std::cout << "Difference is " << difference << std::endl;
product = integer1 * integer2; // assignment of product
std::cout << "Product is " << product << std::endl;
quotient = integer1 / integer2; // assignment of quotient
std::cout << "Quotient is " << quotient << std::endl;
return 0; // indicate that program ended successfully
}