// DuplicateChecker.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; int digitsCheck(int input) { char text[50]; sprintf_s(text, "%i", input); return (int) strlen(text); } int _tmain(int argc, _TCHAR* argv[]) { int values[500]; int limit = 0; while (true) { cout << "Please enter how many nodes you wish to have in your array: "; cin >> limit; if (limit <= 0 || limit > 500) cout << "Invalid amount, please enter a value from 1 to 500." << endl; else break; } int digits = digitsCheck(limit); for (int i=0; i