<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2783563</guid>
        <pubDate>Sun, 19 Dec 2010 12:26:44 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2783563</link>
        <description><![CDATA[Yagami: <strong class='tag-b'>volvo877</strong><br>
Спасибо&#33;]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2783552</guid>
        <pubDate>Sun, 19 Dec 2010 11:49:47 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2783552</link>
        <description><![CDATA[volvo877: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=317219&view=findpost&p=2783518'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Yagami &#064; <time class="tag-quote__quoted-time" datetime="2010-12-19T10:36:50+00:00">19.12.10, 10:36</time></span><div class='quote '>Не знаю как исправить.</div></div>Все просто: ты проверяешь, високосный ли год, и если да - то 28-му февраля присваиваешь статус НЕпоследнего дня, да? Но ведь у тебя и в самом начале Last := false. Сделай так:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 2: if d=28 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last := true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((y mod 4) = 0) and not (((y mod 100) = 0) and ((y mod 400) &#60;&#62; 0))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=false; // Если год - високосный, то 28 февраля - не последний день месяца !!!</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
Ну, и ниже по тексту. Ты ж выводишь d1, m1, y1? вот и работай ТОЛЬКО с ними. D, M, Y оставь в покое&#33; Они уже не нужны тебе... Все изменения - только с d1, m1, y1...<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if last</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d1:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m1=12</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m1:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else m1:=m1+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else d1:=d1+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Следующий день: &#39;, d1, &#39;-&#39;, m1, &#39;-&#39;, y1);</div></ol></div></div></div></div>]]></description>
        <author>volvo877</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2783518</guid>
        <pubDate>Sun, 19 Dec 2010 10:36:50 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2783518</link>
        <description><![CDATA[Yagami: Обнаружил ошибку. Раньше времени не было написать.<br>
<br>
<strong class='tag-b'>Ввод:</strong> 28 2 2010<br>
<strong class='tag-b'>Вывод:</strong> 29 2 2010<br>
<br>
Но 2010 - не высококлассный год.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">program NextDay;</div><div class="code_line">uses crt;</div><div class="code_line">var</div><div class="code_line">y, y1, r: integer;</div><div class="code_line">d, d1: 1..31;</div><div class="code_line">m, m1: 1..12;</div><div class="code_line">last: boolean;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">BEGIN</div><div class="code_line">&nbsp;Write(&#39;Введите день, месяц, год, разделяя пробелами: &#39;);</div><div class="code_line">&nbsp;{$I-} &nbsp; &nbsp; &nbsp;{Проверка коррекности введенных данных}</div><div class="code_line">&nbsp;&nbsp; read(d, m, y);</div><div class="code_line">&nbsp;{$I+}</div><div class="code_line">&nbsp;&nbsp;if IOResult &#60;&#62; 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;writeln(&#39;Вы не ввели три числа. Повторите ввод.&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; exit;</div><div class="code_line">&nbsp;&nbsp; end;</div><div class="code_line">&nbsp;&nbsp; if (d&#60;1) or (d&#62;31) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; writeln(&#39;Ошибка ввода. Введите день (1-31)&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp; readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (m&#60;1) or (m&#62;12) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Ошибка ввода. Введите месяц (1-12)&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if y&#60;1 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Ошибка ввода. Год не долшен быть меньше 1.&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; last:=false;</div><div class="code_line">&nbsp;&nbsp; d1:=d;</div><div class="code_line">&nbsp;&nbsp; m1:=m;</div><div class="code_line">&nbsp;&nbsp; y1:=y;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;case m of</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 4, 6, 9, 11: if d=30</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 2: if d=28</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((y mod 4) = 0) and</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; not (((y mod 100) = 0) and ((y mod 400) &#60;&#62; 0))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; else if d=31</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if last</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m=12</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else m1:=m+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else d1:=d+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Следующий день: &#39;, d1, &#39;-&#39;, m1, &#39;-&#39;, y1);</div><div class="code_line">END.</div></ol></div></div></div></div><br>
<br>
 <br>
<br>
При попытке внесения таких изменений в код:<br>
<br>
     <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; d1:=d;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; m1:=m;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; y1:=y;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; case m of</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 4, 6, 9, 11: if d=30</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 2: if d=28</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((y mod 4) = 0) and</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; not (((y mod 100) = 0) and ((y mod 400) &#60;&#62; 0))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then last:=false;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; else if d=31</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end;</div></ol></div></div></div></div><br>
<br>
<strong class='tag-b'>Ввод: </strong>28 2 2010<br>
<strong class='tag-b'>Вывод:</strong> 1 3 2010<br>
<br>
<strong class='tag-b'>Ввод:</strong> 27 2 2010<br>
<strong class='tag-b'>Вывод:</strong> 1 3 2010<br>
<br>
Не знаю как исправить.  :wall:]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2744085</guid>
        <pubDate>Wed, 03 Nov 2010 16:42:44 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2744085</link>
        <description><![CDATA[Yagami: <strong class='tag-b'>volvo877</strong><br>
Поправил, вроде.]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743804</guid>
        <pubDate>Wed, 03 Nov 2010 11:48:39 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743804</link>
        <description><![CDATA[volvo877: Потому что:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if last</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m=12</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else m1:=m+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else d1:=d+1;</div></ol></div></div></div></div></div></div><br>
И что? Ну, допустим, при Last = true в Y1 что-то хотя бы теоретически может записаться (правда произойдет это только если месяц = декабрь, и должен меняться год, но хоть когда-то). Но если Last = False - то даже теоретически этого не произойдет. У тебя по Else просто нет кода, изменяющего Y1 и M1.<br>
<br>
Выходов 2:<br>
1) либо в самом начале присвоить Y1 := Y; M1 := M; D1 := D, и дальше все оставить без изменений, как сейчас есть, <strong class='tag-b'>если данные должны измениться, они изменятся, нет - останутся те, что ты ввел</strong> (это может быть нужно в случае, если ты не хочешь портить начальную дату)<br>
2) либо работать вообще <strong class='tag-b'>без</strong> Y1, M1, D1. То есть, изменять прямо Y, M, D и печатать их же.<br>
<br>
Выбирать тебе.]]></description>
        <author>volvo877</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743748</guid>
        <pubDate>Wed, 03 Nov 2010 11:04:27 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743748</link>
        <description><![CDATA[Yagami: Исправил, спасибо. Почему-то выводит только день, а месяц и год - 0, 0.<br>Например:<br>Ввод: 10 2 1999<br>Вывод: 11,0,0]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743674</guid>
        <pubDate>Wed, 03 Nov 2010 10:45:12 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743674</link>
        <description><![CDATA[volvo877: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=317219&view=findpost&p=2743663'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Yagami &#064; <time class="tag-quote__quoted-time" datetime="2010-11-03T10:35:32+00:00">03.11.10, 10:35</time></span><div class='quote '>writeln(d1<span class="tag-color tag-color-named" data-value="red" style="color: red"><strong class='tag-b'>,</strong></span> &#39;,&#39;, m1<span class="tag-color tag-color-named" data-value="red" style="color: red"><strong class='tag-b'>,</strong></span> &#39;,&#39;, y1);</div></div>У тебя этих запятых (разделяющих строки и числа) не было, были только строковые литералы для вывода запятой на экран.]]></description>
        <author>volvo877</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743663</guid>
        <pubDate>Wed, 03 Nov 2010 10:35:32 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743663</link>
        <description><![CDATA[Yagami: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">program NextDay;</div><div class="code_line">uses crt;</div><div class="code_line">var</div><div class="code_line">y, y1, r: integer;</div><div class="code_line">d, d1: 1..31;</div><div class="code_line">m, m1: 1..12;</div><div class="code_line">last: boolean;</div><div class="code_line">&nbsp;</div><div class="code_line">BEGIN</div><div class="code_line">&nbsp;Write(&#39;Введите день, месяц, год, разделяя пробелами: &#39;);</div><div class="code_line">&nbsp;{$I-}</div><div class="code_line">&nbsp;&nbsp; read(d, m, y);</div><div class="code_line">&nbsp;{$I+}</div><div class="code_line">&nbsp;&nbsp;if IOResult &#60;&#62; 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;writeln(&#39;Вы не ввели три числа. Повторите ввод.&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; exit;</div><div class="code_line">&nbsp;&nbsp; end;</div><div class="code_line">&nbsp;&nbsp; if (d&#60;1) or (d&#62;31) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; writeln(&#39;Ошибка ввода. Введите день (1-31)&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp; readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (m&#60;1) or (m&#62;12) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Ошибка ввода. Введите месяц (1-12)&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if y&#60;1 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Ошибка ввода. Год не долшен быть меньше 1.&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; last:=false;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;case m of</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 4, 6, 9, 11: if d=30</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 2: if d=28</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((y mod 4) = 0) and</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; not (((y mod 100) = 0) and ((y mod 400) &#60;&#62; 0))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; else if d=31</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if last</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m=12</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else m1:=m+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else d1:=d+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; writeln(&#39;Следующий день: &#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; writeln(d1&#39;,&#39;, m1&#39;,&#39;, y1&#39;,&#39;);</div><div class="code_line">END.</div></ol></div></div></div></div>]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743659</guid>
        <pubDate>Wed, 03 Nov 2010 10:32:49 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743659</link>
        <description><![CDATA[volvo877: Телепаты в отпуске. Либо приводи код <strong class='tag-b'>полностью</strong>, либо ищи ошибки сам. В приведенном фрагменте всего 32 строки, какая из них 74-я?]]></description>
        <author>volvo877</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743651</guid>
        <pubDate>Wed, 03 Nov 2010 10:28:04 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2743651</link>
        <description><![CDATA[Yagami: Дописал проверку введенных данных, опять появились ошибки.<br>
<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">BEGIN</div><div class="code_line">&nbsp;Write(&#39;Введите день, месяц, год, разделяя пробелами: &#39;);</div><div class="code_line">&nbsp;{$I-}</div><div class="code_line">&nbsp;&nbsp; read(d, m, y);</div><div class="code_line">&nbsp;{$I+}</div><div class="code_line">&nbsp;&nbsp;if IOResult &#60;&#62; 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;writeln(&#39;Вы не ввели три числа. Повторите ввод.&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; exit;</div><div class="code_line">&nbsp;&nbsp; end;</div><div class="code_line">&nbsp;&nbsp; if (d&#60;1) or (d&#62;31) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; writeln(&#39;Ошибка ввода. Введите день (1-31)&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp; readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (m&#60;1) or (m&#62;12) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Ошибка ввода. Введите месяц (1-12)&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if y&#60;1 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;writeln(&#39;Ошибка ввода. Год не долшен быть меньше 1.&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;reset(input);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;readln;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div></ol></div></div></div></div><br>
(74,20) Fatal: Syntax error, &quot;)&quot; expected but &quot;const char&quot; found]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740873</guid>
        <pubDate>Sun, 31 Oct 2010 06:39:18 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740873</link>
        <description><![CDATA[Yagami: <strong class='tag-b'>volvo877</strong><br>
Незачем. Отвлекся на телефонный звонок.]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740868</guid>
        <pubDate>Sun, 31 Oct 2010 06:29:11 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740868</link>
        <description><![CDATA[volvo877: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if <span style='color:red'>(</span>(y mod 4) = 0) and</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; not (((<span style='color:red'>y</span> mod 100) = 0) and ((<span style='color:red'>y</span> mod 400) &#60;&#62; 0)<span style='color:red'>)</span> then last := true;</div></ol></div></div></div></div><br>
Красным выделены места ошибок. По ссылке же было правильное написание, ЗАЧЕМ понадобилось убирать скобки?]]></description>
        <author>volvo877</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740861</guid>
        <pubDate>Sun, 31 Oct 2010 06:14:48 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740861</link>
        <description><![CDATA[Yagami: <strong class='tag-b'>volvo877</strong><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">var</div><div class="code_line">y, y1, r: integer;</div><div class="code_line">d, d1: 1..31;</div><div class="code_line">m, m1: 1..12;</div><div class="code_line">last: boolean;</div><div class="code_line">&nbsp;</div><div class="code_line">BEGIN</div><div class="code_line">&nbsp;Writeln(&#39;Ввод даты: &#39;);</div><div class="code_line">&nbsp;&nbsp; read(d);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; last:=false;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;case m of</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 4, 6, 9, 11: if d=30</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; 2: if d=28</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r := (y mod 4) = 0) and</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;not (((n mod 100) = 0) and ((n mod 400) &#60;&#62; 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; else if d=31</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if last</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m=12</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else m1:=m+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else d1:=d+1;</div><div class="code_line">END.</div></ol></div></div></div></div><br>
<br>
Компилятор сообщает об ошибке: &quot;(26,35) Error: Incompatible types: got &quot;Boolean&quot; expected &quot;SmallInt&quot;.&quot;<br>
Как исправить?]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740448</guid>
        <pubDate>Sat, 30 Oct 2010 10:26:22 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740448</link>
        <description><![CDATA[Polinom2686: <strong class='tag-b'>Yagami</strong>, ты смотри на сообщения компилятора, он показывает место ошибки.]]></description>
        <author>Polinom2686</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740445</guid>
        <pubDate>Sat, 30 Oct 2010 10:19:15 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740445</link>
        <description><![CDATA[volvo877: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=317219&view=findpost&p=2740436'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Yagami &#064; <time class="tag-quote__quoted-time" datetime="2010-10-30T09:59:40+00:00">30.10.10, 09:59</time></span><div class='quote '>Можно решить задачу используя перечислимые и интервальные типы? </div></div>Разумеется. Для дней достаточно интервала 1..31, для месяцев - 1..12 (или вообще сделать перечислимый тип Jan, Feb, ..., Dec), совсем не обязательно использовать Integer.<br>
<br>
P.S.<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=317219&view=findpost&p=2740423'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Polinom2686 &#064; <time class="tag-quote__quoted-time" datetime="2010-10-30T09:25:47+00:00">30.10.10, 09:25</time></span><div class='quote '><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r:=y mod 4;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if r &#60;&#62; 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then last:=true;</div></ol></div></div></div></div></div></div><br>
Этого недостаточно, чтобы определить високосность года: <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=79768&view=findpost&p=580679' target='_blank'>Является-ли год високосный ? (сообщение #580679)</a>]]></description>
        <author>volvo877</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740436</guid>
        <pubDate>Sat, 30 Oct 2010 09:59:40 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740436</link>
        <description><![CDATA[Yagami: <strong class='tag-b'>Polinom2686</strong><br>
Спасибо&#33; Невнимательность  :wall: <br>
Можно решить задачу используя перечислимые и интервальные типы?]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740423</guid>
        <pubDate>Sat, 30 Oct 2010 09:25:47 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740423</link>
        <description><![CDATA[Polinom2686: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Var</div><div class="code_line">d, m, y, d1, m1, y1, r: integer;</div><div class="code_line">last: boolean;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; </div><div class="code_line">BEGIN</div><div class="code_line">{Ввод данных добавлю позже}</div><div class="code_line">last:=false;</div><div class="code_line">case m of</div><div class="code_line">&nbsp;4, 6, 9, 11: if d=30</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then last:=true;</div><div class="code_line">&nbsp;2: if d=28</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r:=y mod 4;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if r &#60;&#62; 0 </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;else if d=31 </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then last=true; // тут ошибка</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">if last </div><div class="code_line">&nbsp;&nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; d:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if m=12 </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else m1:=m+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; else d1:=d+1;</div><div class="code_line">END.</div></ol></div></div></div></div>]]></description>
        <author>Polinom2686</author>
        <category>Pascal</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740362</guid>
        <pubDate>Sat, 30 Oct 2010 06:57:43 +0000</pubDate>
        <title>Дата следующего дня</title>
        <link>https://forum.sources.ru/index.php?showtopic=317219&amp;view=findpost&amp;p=2740362</link>
        <description><![CDATA[Yagami: Пишу программу, опрeдeляющую дaту слeдующeго дня. Ceгoдняшняя дата вводится с клавиатуры.<br>
d, m, y - сeгoдня.<br>
d1, m1, y1 - завтра.<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">var</div><div class="code_line">d, m, y, d1, m1, y1, r: integer;</div><div class="code_line">last: boolean;</div><div class="code_line">&nbsp;</div><div class="code_line">BEGIN</div><div class="code_line">{Ввод данных добавлю позже}</div><div class="code_line">&nbsp;&nbsp; last:=false;</div><div class="code_line">&nbsp;&nbsp; case m of</div><div class="code_line">&nbsp;&nbsp; 4, 6, 9, 11: if d=30</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;then last:=true;</div><div class="code_line">&nbsp;&nbsp; 2: if d=28</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r:=y mod 4;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if r &#60;&#62; 0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;last:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if d=31 then last=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if last then begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m=12 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y1:=y+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else m1:=m+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else d1:=d+1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END.</div></ol></div></div></div></div><br>
<br>
Free Pascal v2.4.0 при компиляции выдает ошибку: &quot;Error Illegal expression&quot;. Помогите исправить. В алгоритме нет ошибок?]]></description>
        <author>Yagami</author>
        <category>Pascal</category>
      </item>
	
      </channel>
      </rss>
	