Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
int _devs_sum(int _value)
{
int _res = 0, i;
for(i = 1; i <= _value / 2; i++) if(_value % i == 0) _res += i; return _res; } int main(void) { int _pairs_n, _first, _second; printf("Input the number of pairs to be found: "); scanf("%d", &_pairs_n); for(_first = 2; _pairs_n > 0; _first++)
{
_second = _devs_sum(_first);
if(_first < _second && _devs_sum(_second) == _first) { printf("(%d, %d)\n", _first, _second); _pairs_n--; } } return 0; }[/code]
Read more at the link:
https://github.com/DexGame