<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Соотношение чисел]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=9540</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9540&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Соотношение чисел».]]></description>
		<lastBuildDate>Sun, 27 Apr 2014 13:08:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82339#p82339</link>
			<description><![CDATA[<p>Да, что-то я упустил, после сокращения дроби на НОД числа будут взаимно простые, и <strong>while</strong> не нужен.</p>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Sun, 27 Apr 2014 13:08:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82339#p82339</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82338#p82338</link>
			<description><![CDATA[<div class="quotebox"><cite>Irbis пишет:</cite><blockquote><p>Если я правильно понял задачу:<br /></p><div class="codebox"><pre><code>a := 1920, b := 1080

While (N:=Nod(a,b)) &lt;&gt; 1
   a //=N, b//=N
MsgBox % a . &quot; / &quot; . b
Return

Nod(a,b)
{
  Return !b ? a : Nod(b, mod(a,b))
}
</code></pre></div></blockquote></div><p>Не совсем понятно, зачем здесь<br /></p><div class="codebox"><pre><code>While (N:=Nod(a,b)) &lt;&gt; 1
   a //=N, b//=N</code></pre></div><p>??<br /></p><div class="codebox"><pre><code>a := 3, b := 7
nod := Nod(a,b)
MsgBox, % a//nod . &quot;/&quot; . b//nod

Nod(a,b)
{
  Return !b ? a : Nod(b, mod(a,b))
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 27 Apr 2014 12:07:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82338#p82338</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82331#p82331</link>
			<description><![CDATA[<p>Не за что, тем более что я просто взял практически готовый алгоритм на СРР и перенес на АНК <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Sat, 26 Apr 2014 23:05:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82331#p82331</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82329#p82329</link>
			<description><![CDATA[<p>Нет правда, отличный урок с рекурсией, спасибо. Я бы не придумал.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 26 Apr 2014 21:42:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82329#p82329</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82328#p82328</link>
			<description><![CDATA[<p><strong>Irbis</strong><br />ШиКаРно! 5+</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 26 Apr 2014 21:08:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82328#p82328</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82327#p82327</link>
			<description><![CDATA[<p>Если я правильно понял задачу:<br /></p><div class="codebox"><pre><code>a := 1920, b := 1080

While (N:=Nod(a,b)) &lt;&gt; 1
   a //=N, b//=N
MsgBox % a . &quot; / &quot; . b
Return

Nod(a,b)
{
  Return !b ? a : Nod(b, mod(a,b))
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Irbis)]]></author>
			<pubDate>Sat, 26 Apr 2014 19:54:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82327#p82327</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82326#p82326</link>
			<description><![CDATA[<p>А нет, что то не то:<br /></p><div class="codebox"><pre><code> 
w = 720  
h = 1280
</code></pre></div><p>4 / 8 ???</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 26 Apr 2014 19:53:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82326#p82326</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82325#p82325</link>
			<description><![CDATA[<p>Вроде дошло <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>
w = 1280
h = 720
 
a := mod(w, h)

While a
    b := a, a := mod(w, a)  
While b
    c := b, b := mod(h, b)  
MsgBox %  w // c &quot; / &quot; h // c
</code></pre></div><p>Хотя может есть способ проще...</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 26 Apr 2014 19:50:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82325#p82325</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Соотношение чисел]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=82323#p82323</link>
			<description><![CDATA[<p>Видимо моск отказывает, но как получить соотношение чисел не соображу.<br />Например:<br /></p><div class="codebox"><pre><code>
w = 640
h = 480

***

ratio = 4 / 3
MsgBox % ratio
</code></pre></div><p>640 к 480 относится также как 4 к 3, ну Вы меня поняли <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>То есть суть: найти общий делитель.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 26 Apr 2014 19:00:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=82323#p82323</guid>
		</item>
	</channel>
</rss>
