Hello! I am very new to code and I also have a mac which made this a little confusing. Anyways, i have fixed all of my errors in this code thus far and I am still getting an "Expected Unqualified-id" error message. It does not specify where the error is. Can anyone look this over and help me out? Thanks!
#include <iostream> // allows program to perform input and output
using std::cout; // program uses cout
using std::endl; // program uses endl
using std::cin; // program uses cin
int main();
{
int number;
int number1; // first integer read from user
int number2; // second integer read from user
int number3; // third integer read from user
int smallest; // smallest integer read from user
int largest; // largest integer read from user
int sum; // sum of integers read from user
double average; // average of integers read from user
int product; // product of integers read from user
std::cout << "Input three different integers: "; // prompt
cin >> number1 >> number2 >> number3; /* write a statement to read in values for number1, number2, and number3 using a single cin statement */
largest = number1; // assume first integer is largest
if (number2 > largest)
cout << number2 << ">" << largest << endl; /* write a statement to determine if number2 is greater than largest. If so assign number2 to largest*/
if (number3 > largest)
cout << number3;
number3 = largest; /* Write a statement to determine if number3 is greater than largest. If so assign number3 to largest */
smallest = number1; // assume first integer is smallest
if (number2 < smallest)
cout << number2 << "<" << smallest << endl; /* Write a statement to determine if number2 is less than
smallest. If so assign number2 to smallest */
if (number3 < smallest)
cout << number3;
number 3 = smallest; /* Write a statement to determine if number3 is less than smallest. If so assign number2 to smallest */
std::cout << "The answers are: ";
cout << "Largest = " << largest
<< "Smallest = " << smallest
<< "Sum = " << number1 + number2 + number3
<< "Average = " << (number1 + number2 + number3) / 3
<< "Product = " << number1 * number2 * number3 << endl; /* write an output statement that prints the largest, smallest, sum, average, and product */
return 0;
}
// end main