Getting 2 Errors

...
Last edited on
Move your includes to above main. Who told you to put the where they are now??
...
Last edited on
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
Thank you for your help!
Topic archived. No new replies allowed.