aboutsummaryrefslogtreecommitdiffstats
path: root/BinarySearch.cpp
blob: a9e73b6696846230c6076c3658b816a8e13e28fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>

using namespace std;

int main() {
	double result, num, divi;
	result = 0.0;
	num = 1.0;
	divi = 1.0;

	for(int i = 2; i < 1000; i++) {
		for(int j = 2; j < 1000; j++) {
			num = (double)i;
			divi = (double)j;
			result = (double)(num/divi)*((num-1)/(divi-1));
			if(result == 0.5) {
				cout << i << " " << j << endl;
			}
			cout << j << endl;
		}
	}
	return 0;
}