<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'New program' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'New program' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 23:13:32 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 23:13:32 -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>New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430896/new-program/</link>
      <description>&lt;span style="color: Blue;"&gt;hello there, am new at sortoff new into the pascal environment and would love to get some assistance in that please. i have to create a program that will allow the entry of 10 students’ name, sex and grade which should display the percentage of students who got a grade of 50 or more.The Percentage of male students getting 50 or above together with the percentage of female students getting 50 or above.The program should also print the female with the highest average and the male with the highest average.&lt;br /&gt;
please help me since this is puzzling me and in urgent need of submission. thanking the person who helps with this asap!!&lt;/span&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430896/new-program/</guid>
      <pubDate>Sun, 13 Jan 2013 12:19:22 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430898/re-new-program/#430898</link>
      <description>You should use a pascal record structure like this:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://pascal-programming.info/lesson11.php"&gt;http://pascal-programming.info/lesson11.php&lt;/a&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430898/re-new-program/#430898</guid>
      <pubDate>Sun, 13 Jan 2013 14:14:27 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430899/re-new-program/#430899</link>
      <description>that is d code i started with so far but am getting alot of problems:&lt;br /&gt;
&lt;br /&gt;
program Grading_System;&lt;br /&gt;
&lt;br /&gt;
uses&lt;br /&gt;
  crt;&lt;br /&gt;
&lt;br /&gt;
var&lt;br /&gt;
  ClassNames : array[1..10] of string[20];&lt;br /&gt;
  ClassGen : array[1..10] of string[20];&lt;br /&gt;
  ClassAvg : array[1..10] of integer;&lt;br /&gt;
  LoopCounter : integer;&lt;br /&gt;
  NumberOfNames : integer;&lt;br /&gt;
  sum:integer;&lt;br /&gt;
  average: real;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
  clrscr;&lt;br /&gt;
  write('How many names are you entering (max 10)? ');&lt;br /&gt;
  readln(NumberOfNames);&lt;br /&gt;
&lt;br /&gt;
  {Input Names, Grades and Gender}&lt;br /&gt;
  LoopCounter := 1;&lt;br /&gt;
  while LoopCounter &amp;lt;= NumberOfNames do&lt;br /&gt;
    begin&lt;br /&gt;
      writeln;&lt;br /&gt;
      writeln('Enter Name: ',LoopCounter);&lt;br /&gt;
      readln(ClassNames[LoopCounter]);&lt;br /&gt;
      writeln;&lt;br /&gt;
      writeln('Enter Gender: ',LoopCounter);&lt;br /&gt;
      readln(ClassGen[LoopCounter]);&lt;br /&gt;
      writeln;&lt;br /&gt;
      writeln('Enter Average: ',LoopCounter);&lt;br /&gt;
      readln(ClassAvg[LoopCounter]);&lt;br /&gt;
      LoopCounter := LoopCounter + 1;&lt;br /&gt;
    end;&lt;br /&gt;
&lt;br /&gt;
  {Print out names}&lt;br /&gt;
  writeln('Here is the list of names');&lt;br /&gt;
  LoopCounter := 1;&lt;br /&gt;
  while LoopCounter &amp;lt;= NumberOfNames do&lt;br /&gt;
    begin&lt;br /&gt;
      writeln(ClassNames[LoopCounter],' : ',ClassGen[LoopCounter],' : ',ClassAvg[LoopCounter]);&lt;br /&gt;
      LoopCounter := LoopCounter + 1;&lt;br /&gt;
    end;&lt;br /&gt;
  readln;&lt;br /&gt;
&lt;br /&gt;
  {Students with 50+ average}&lt;br /&gt;
  writeln('Here is the percentage of students with 50+ average');&lt;br /&gt;
  LoopCounter := 1;&lt;br /&gt;
  while LoopCounter &amp;lt;= NumberOfNames do&lt;br /&gt;
    begin&lt;br /&gt;
      if ClassAvg[10] &amp;gt;= 50 then&lt;br /&gt;
        sum := 0;&lt;br /&gt;
        sum := sum + ClassAvg[10];&lt;br /&gt;
        average := sum / 100;&lt;br /&gt;
        writeln('Percentage of Students with 50+ average is: ',average:10:2,'%');&lt;br /&gt;
        LoopCounter := LoopCounter + 1;&lt;br /&gt;
    end;&lt;br /&gt;
  readln;&lt;br /&gt;
&lt;br /&gt;
end.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430899/re-new-program/#430899</guid>
      <pubDate>Sun, 13 Jan 2013 15:23:22 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430955/re-new-program/#430955</link>
      <description>&lt;pre class="sourcecode"&gt;
(*
i have to create a program that will
   allow the entry of 10 students’ name, sex and grade

which should display :
   the percentage of students who got a grade of 50 or more.
   The Percentage of male students getting 50 or above.
   The percentage of female students getting 50 or above.
   The the female with the highest average
   The male with the highest average.
*)

program Grading_System ;
(*
uses crt ;
*)
var
   ClassNames     : array[1..10] of string[20] ;
   ClassGen       : array[1..10] of char ;
   ClassAvg       : array[1..10] of integer ;
   LoopCounter    : integer ;
   NumberOfNames  : integer ;
   sum            : integer ;
   average        : real ;

begin
   (*
   clrscr ;
   *)
   write('How many names are you entering (max 10)? ') ;
   readln(NumberOfNames) ;
   
   
   {
      Input Names, Grades and Gender
   }
   for LoopCounter := 1 to NumberOfNames do begin
      writeln ;
      writeln('Enter Name: ',LoopCounter) ;
      readln(ClassNames[LoopCounter]) ;

      repeat
         writeln ;
         writeln('Enter Gender: ',LoopCounter) ;
         readln(ClassGen[LoopCounter]) ;
      until ClassGen[LoopCounter] in ['F','M'] ;

      writeln ;
      writeln('Enter Average: ',LoopCounter) ;
      readln(ClassAvg[LoopCounter])
   end ;
   
   {
      Print out names
   }
   writeln('Here is the list of names') ;
   for LoopCounter := 1 to NumberOfNames do
      writeln(ClassNames[LoopCounter]:20, ' : ',ClassGen[LoopCounter],' : ',ClassAvg[LoopCounter]:5) ;
   readln ;
   
   {
      Students with 50+ average
   }
   sum := 0 ;
   for LoopCounter := 1 to NumberOfNames do
      if ClassAvg[LoopCounter] &amp;gt;= 50 then
         sum := sum + 1 ;
   average := 100.0 * sum / NumberOfNames ;

   writeln('Percentage of Students with 50+ average is: ', average:0:2,'%') ;
   readln
end.


&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430955/re-new-program/#430955</guid>
      <pubDate>Thu, 17 Jan 2013 14:09:53 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430957/re-new-program/#430957</link>
      <description>thank you very much for your assistance, i just had to add in piece of the same code you had below to get for the males with 50+ average but it's working like a charm. I can't express my thanks but i really do appreciate you help much.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430957/re-new-program/#430957</guid>
      <pubDate>Thu, 17 Jan 2013 17:43:45 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430959/re-new-program/#430959</link>
      <description>please help me with this. i have to find the gender with the highest number. both male and female that has the highest value, so i came up with this part of the code but am getting the same value for both male and female:&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
      Female and Male with highest value&lt;br /&gt;
   }&lt;br /&gt;
   high := ClassAvg[1] ;&lt;br /&gt;
   low := ClassAvg[1] ;&lt;br /&gt;
&lt;br /&gt;
   begin&lt;br /&gt;
      if (ClassAvg[LoopCounter] &amp;gt; high) and (ClassGen[LoopCounter] = 'M') then&lt;br /&gt;
         high := ClassAvg[LoopCounter] ;&lt;br /&gt;
&lt;br /&gt;
      if (ClassAvg[LoopCounter] &amp;lt; low) and (ClassGen[LoopCounter] = 'M') then&lt;br /&gt;
         low := ClassAvg[LoopCounter] ;&lt;br /&gt;
&lt;br /&gt;
      if (ClassAvg[LoopCounter] &amp;gt; high) and (ClassGen[LoopCounter] = 'F') then&lt;br /&gt;
         high := ClassAvg[LoopCounter] ;&lt;br /&gt;
&lt;br /&gt;
      if (ClassAvg[LoopCounter] &amp;lt; low) and (ClassGen[LoopCounter] = 'F') then&lt;br /&gt;
         low := ClassAvg[LoopCounter] ;&lt;br /&gt;
   end;&lt;br /&gt;
   writeln('Male with highest grade is: ',ClassNames[LoopCounter],' - ',ClassGen[LoopCounter],' : ',high) ;&lt;br /&gt;
   readln ;&lt;br /&gt;
   writeln('Female with highest grade is: ',ClassNames[LoopCounter],' - ',ClassGen[LoopCounter],' : ',high) ;&lt;br /&gt;
   readln</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430959/re-new-program/#430959</guid>
      <pubDate>Thu, 17 Jan 2013 19:32:06 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430963/re-new-program/#430963</link>
      <description>This is a fragment.  I have not had time to compile and test it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
var
   .
   .
   .
   Marker : char ;
   Index  : integer ;
   GenStr : string[6] ;

begin
   .
   .
   .
   {
      Female and Male with highest value
   }
   Marker := 'F' ;
   while Marker &amp;lt;= 'M' do begin
      if Marker = 'F' then
         GenStr := 'Female'
      else
         GenStr := 'Male' ;

      Index := 0 ;
      Max   := 0 ;
      for LoopCounter := 1 to NumberOfNames do begin
         if (ClassGen[LoopCounter] = Marker) and (ClassAvg[LoopCounter] &amp;gt; Max) then begin
            Max   := ClassAvg[LoopCounter] ;
            Index := LoopCounter
         end         
      end ;

      if Index = 0 then
         writeln ('There are no ', GenStr, 's in the class.')
      else
         writeln (ClassNames[Index], ' with an average of ',
                  ClassAvg[Index], ' is the highest ranking',       
                  Genstr, ' in the class.') ;

      Marker := 'M'
   end ;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430963/re-new-program/#430963</guid>
      <pubDate>Thu, 17 Jan 2013 22:09:02 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430974/re-new-program/#430974</link>
      <description>thank you very much but i have to get both gender; male and female with the highest grade of the program. i have used what you have created and am trying to adjust it but am getting an infinity loop. just keep going, please assist me in that but am also trying to curb the problem.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430974/re-new-program/#430974</guid>
      <pubDate>Fri, 18 Jan 2013 15:48:12 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430976/re-new-program/#430976</link>
      <description>Sorry about that.  As I said I didn't have time to test it.  This should cure the infinite loop.  The code handles Female the first time through the loop and Male the second time.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
var
   .
   .
   .
   Marker : char ;
   Index  : integer ;
   GenStr : string[6] ;
   Count  : 1 .. 2 ;

begin
   .
   .
   .
   {
      Female and Male with highest value
   }
   &lt;span style="color: Red;"&gt;for Count := 1 to 2 do begin  { loop two times }
      if Count = 1 then begin         { 'Female' the first time thru }
         Marker := 'F' ;
         GenStr := 'Female'
      end
      else begin                      { 'Male' the second time thru }
         Marker := 'M' ;
         GenStr := 'Male'
      end ;
&lt;/span&gt;

      Index := 0 ;
      Max   := 0 ;
      for LoopCounter := 1 to NumberOfNames do begin
         if (ClassGen[LoopCounter] = Marker) and (ClassAvg[LoopCounter] &amp;gt; Max) then begin
            Max   := ClassAvg[LoopCounter] ;
            Index := LoopCounter
         end         
      end ;

      if Index = 0 then
         writeln ('There are no ', GenStr, 's in the class.')
      else
         writeln (ClassNames[Index], ' with an average of ',
                  ClassAvg[Index], ' is the highest ranking',       
                  Genstr, ' in the class.')
   end ;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430976/re-new-program/#430976</guid>
      <pubDate>Fri, 18 Jan 2013 21:16:53 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430977/re-new-program/#430977</link>
      <description>: &lt;span style="color: Blue;"&gt;hello there, am new at sortoff new into the pascal &lt;br /&gt;
: environment and would love to get some assistance in that please. i &lt;br /&gt;
: have to create a program that will allow the entry of 10 students’ &lt;br /&gt;
: name, sex and grade which should display the percentage of students &lt;br /&gt;
: who got a grade of 50 or more.The Percentage of male students &lt;br /&gt;
: getting 50 or above together with the percentage of female students &lt;br /&gt;
: getting 50 or above.The program should also print the female with &lt;br /&gt;
: the highest average and the male with the highest average.&lt;br /&gt;
: please help me since this is puzzling me and in urgent need of &lt;br /&gt;
: submission. thanking the person who helps with this asap!!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do you know how to use&lt;br /&gt;
&lt;br /&gt;
* Procedures&lt;br /&gt;
* Functions&lt;br /&gt;
* Records&lt;br /&gt;
* User defined types, particularly enumerated types&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430977/re-new-program/#430977</guid>
      <pubDate>Fri, 18 Jan 2013 21:25:02 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: New program</title>
      <link>http://www.programmersheaven.com/mb/pasprog/430896/430982/re-new-program/#430982</link>
      <description>hey, no i don't no much of them things especially in the Pascal environment. I was just given a crash course in it online and by some friends in order to get myself in it. so can you please give me some assistance in it since am beginning to love the programming sector and am thinking of getting into it full time because i love creating solutions. Thanks again Actor21, u have been a great help and i do appreciate all you have done for me.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/430896/430982/re-new-program/#430982</guid>
      <pubDate>Sat, 19 Jan 2013 09:07:44 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>