Program not outputting correctly

I have to create a program that the user enters the input for three sides of a triangle and the output tells me whether it is a right triangle or not. The issue I'm having is that no matter the input, it tells me it is a right triangle. Here is my code.

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
30
31
32
33
34
35
36
37
#include <iostream>
#include <iomanip>

using namespace std;

int main(){

	int a;
	int b;
	int c;
	int hypo;
	int opp;
	int adj;

	cout << "What is a or the opposite side?" << endl;
	cin >> a;

	cout << "What is b or the adjacent side?" << endl;
	cin >> b;

	cout << "What is c or the hypotenuse?" << endl;
	cin >> c;
	
	hypo = c*c;
	opp = a*a;
	adj = b*b;

	if (hypo = opp + adj){
		cout << "This is a right triangle." << endl;
	}
	else {
		cout << "This is not a right triangle." << endl;
	}

	system("Pause");
	return 0;
}
Never mind, I ended up figuring it out. It was because I didn't use == for the comparison in the if statement.
Topic archived. No new replies allowed.