I don’t understand why my program isn’t running

0 votes
asked Oct 27, 2019 by KymaniStone (120 points)
program Calculate_Grade

const

Course_percent = 0.4;

Exam_percent = 0.6;

var

   Stufname, Stulname, Cname: Array [1..3] of string;

   StuId, Finalg : Array[1..3] of real;

   Cgradepoint, Egradepoint:real;

   Cgrade,Egrade : Array [1..3] of real;

   Coursep,ExamP: real;

   G : Integer;

   sum : Real;

   A : 80..100;

   B : 70..79;

   C : 50..69;

   D : 40..49;

   

begin

  For G:= 1 to 3 do

Begin

  writeln('Enter Student First Name');

  Readln(Stufname[G]);

  writeln('Enter Student last Name');

  Readln(Stulname[G]);

  writeln('Enter Student Id Number');

  Readln(StuID[G]);

  writeln('Enter Course Name');

  Readln(Cname[G]);

  writeln('Enter Course Grade');

  Readln(Cgrade[G]);

  writeln('Enter Exam Grade');

  Readln(Egrade[G]);

  

  

  Cgradepoint:=Course_percent*Cgrade[G];

  Egradepoint:=Exam_percent*Egrade[G];

  

  write('Course percentage is:',Cgradepoint :1:1); write('%');

  writeln();

  writeln();

  write('Exam percentage is:',Egradepoint :1:1); write('%');

  

  sum:=Cgradepoint + Egradepoint;

  writeln('Final_Grade is',sum :1:1);

  

  if sum >= A

  then

  writeln('Grade letter is: A')

  else

  if sum >= B

  then;

  writeln('Grade letter is:B')

  else

  if sum >= C

  then

  writeln('Grade letter is:C')

  else

  if sum >= D

  then

  writeln ('Grade letter is:D')

  

  

   End;

   End;

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...