#include "..\CookHeader.h"

Array <int> dataAry = { 188, 50, 150, 168, 50, 162, 105, 120, 177, 50 };

Array <int> seqSearch(Array <int> ary, int fData) {
	Array <int> posAry;
	int sz = len(ary);
	for (int i = 0; i < sz; i++) {
		if (ary[i] == fData) {
			posAry.push_back(i);
		}
	}
	return posAry;
}

int main() {
	int findData = 50;
	print("배열-->");
	printArray(dataAry);
	Array <int> positionAry = seqSearch(dataAry, findData);
	if (len(positionAry) == -1) {
		println(to_string(findData) + "이(가) 없네요.");
	}
	else {
		print(to_string(findData) + "이(가) 있는 위치 : ");
		printArray(positionAry);
	}
}
