<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'need help! simple counting programm' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'need help! simple counting programm' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 22:44:55 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 22:44:55 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>need help! simple counting programm</title>
      <link>http://www.programmersheaven.com/mb/pasprog/427015/427015/need-help-simple-counting-programm/</link>
      <description>so i am beginer and just studying all this things and i would like to get help, if anyone can help me :) so there is the thing:&lt;br /&gt;
Programm looks like this:&lt;br /&gt;
&lt;br /&gt;
program program1;&lt;br /&gt;
var a, b:integer;&lt;br /&gt;
begin&lt;br /&gt;
b:=0;&lt;br /&gt;
for a:=100 downto 1 do&lt;br /&gt;
b:=b+a;&lt;br /&gt;
writeln('number summ from 1 to 100 is: ',b);&lt;br /&gt;
readln;&lt;br /&gt;
end.&lt;br /&gt;
&lt;br /&gt;
and i want to add to this program 1 feature; so how to get this program that it makes sum from 1 to 100 but doesnt counts in number which contains 7, like 7; 17; 37; 72 ... &lt;br /&gt;
so the thing is that i need to count all numbers (1 to 100) in summ but without those ones who contains 7&lt;br /&gt;
&lt;br /&gt;
any help would be good :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/427015/427015/need-help-simple-counting-programm/</guid>
      <pubDate>Thu, 26 Jan 2012 02:15:45 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: need help! simple counting programm</title>
      <link>http://www.programmersheaven.com/mb/pasprog/427015/427077/re-need-help-simple-counting-programm/#427077</link>
      <description>Why do you count down instead of up?&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program program2;
var
   a, b:integer;
begin
   b:=0;
   for a:=100 downto 1 do begin
      if (a mod 10) = 7 then
         continue ;
      if ((a div 10) mod 10) = 7 then
         continue ;
      b:=b+a
   end ;
   writeln('number summ from 1 to 100 is: ',b) ;
   readln;
end.
&lt;/pre&gt;&lt;br /&gt;
If you have an older Pascal that does not support &lt;strong&gt;continue&lt;/strong&gt; then&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program program3;
var
   a, b:integer;
   flag1,
   flag2 : boolean ;
begin
   b:=0;
   for a:=100 downto 1 do begin
      flag1 := ((a mod 10) = 7) ;
      flag2 := (((a div 10) mod 10) = 7) ;
      if (not flag1) and (not flag2) then
         b:=b+a
   end ;
   writeln('number summ from 1 to 100 is: ',b) ;
   readln;
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/427015/427077/re-need-help-simple-counting-programm/#427077</guid>
      <pubDate>Sat, 28 Jan 2012 11:29:00 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: need help! simple counting programm</title>
      <link>http://www.programmersheaven.com/mb/pasprog/427015/427078/re-need-help-simple-counting-programm/#427078</link>
      <description>Why do you count down instead of up?&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program program2;
var
   a, b:integer;
begin
   b:=0;
   for a:=100 downto 1 do begin
      if (a mod 10) = 7 then
         continue ;
      if ((a div 10) mod 10) = 7 then
         continue ;
      b:=b+a
   end ;
   writeln('number summ from 1 to 100 is: ',b) ;
   readln;
end.
&lt;/pre&gt;&lt;br /&gt;
If you have an older Pascal that does not support &lt;strong&gt;continue&lt;/strong&gt; then&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
program program3;
var
   a, b:integer;
   flag1,
   flag2 : boolean ;
begin
   b:=0;
   for a:=100 downto 1 do begin
      flag1 := ((a mod 10) = 7) ;
      flag2 := (((a div 10) mod 10) = 7) ;
      if (not flag1) and (not flag2) then
         b:=b+a
   end ;
   writeln('number summ from 1 to 100 is: ',b) ;
   readln;
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/427015/427078/re-need-help-simple-counting-programm/#427078</guid>
      <pubDate>Sat, 28 Jan 2012 11:31:28 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Most elegant solution</title>
      <link>http://www.programmersheaven.com/mb/pasprog/427015/427079/most-elegant-solution/#427079</link>
      <description>&lt;pre class="sourcecode"&gt;
program program4;
{
   probably the most elegant solution
}
var
   a, b : integer ;
begin
   b := 0 ;
   for a := 1 to 100 do
      if ((a mod 10) &amp;lt;&amp;gt; 7) and (((a div 10) mod 10) &amp;lt;&amp;gt; 7) then
         b := b + a ;
   writeln('number sum from 1 to 100 is: ', b) ;
   readln
end.
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/427015/427079/most-elegant-solution/#427079</guid>
      <pubDate>Sat, 28 Jan 2012 11:42:28 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: need help! simple counting programm</title>
      <link>http://www.programmersheaven.com/mb/pasprog/427015/427101/re-need-help-simple-counting-programm/#427101</link>
      <description>thank you :) it helped :)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/427015/427101/re-need-help-simple-counting-programm/#427101</guid>
      <pubDate>Mon, 30 Jan 2012 01:08:09 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>
