Recent

Author Topic: Arrays for Pascal's Procedures  (Read 1656 times)

oshani

  • Newbie
  • Posts: 1
Arrays for Pascal's Procedures
« on: June 26, 2016, 07:21:56 am »
Can someone tell me what's wrong here? please...

Program ictmarks;
var mark:array[0..4] of integer;
  procedure getMark(var mark:array[0..4]of integer);
      var I:integer;
           begin
           for I:= 0 to 4 do
           begin
           Writeln('Enter Marks:');
           Read(mark);
           end;
     end;
           Procedure FindtheMax(var mark:array[0..4] of integer);
             var Max,I:integer;
                begin
                max:=mark[0];
                  for I:= 0 to 4 do
                    begin
                    if Mark>max then
                    max:=Mark
                    end;
               Writeln('The Maximum Mark is:',max);
               end;
Begin
getMark(Mark);
findthemax(Mark);
end.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Arrays for Pascal's Procedures
« Reply #1 on: June 26, 2016, 09:05:34 am »