Getting 2 Errors

Jan 17, 2011 at 12:52am
...
Last edited on Jan 17, 2011 at 2:44am
Jan 17, 2011 at 12:59am
Move your includes to above main. Who told you to put the where they are now??
Jan 17, 2011 at 1:00am
...
Last edited on Jan 17, 2011 at 2:44am
Jan 17, 2011 at 1:02am
you need to access the standard namespace.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include <cmath>
#include <iomanip>


int main()
{
	int myNumber1, myNumber2, smallestNumber = 0;
	std::cout << "Please enter a number.";
	std::cin >> myNumber1;
	std::cout << "Please enter a second number.";
	std::cin >> myNumber2;
	if (myNumber1 == myNumber2){
		std::cout << "The two numbers you have entered are even." << std::endl;

		if (myNumber1 > myNumber2){
			smallestNumber = myNumber2;
		}
	}
	else {
		smallestNumber = myNumber1;
	}
	std::cout << smallestNumber << " is the smallest number of the two." << std::endl;

	std::cin.sync();
	std::getchar();
}



Last edited on Jan 17, 2011 at 1:11am
Jan 17, 2011 at 1:14am
Thank you for your help!
Topic archived. No new replies allowed.