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

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


Course_percent = 0.4;

Exam_percent = 0.6;


   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;



  For G:= 1 to 3 do


  writeln('Enter Student First Name');


  writeln('Enter Student last Name');


  writeln('Enter Student Id Number');


  writeln('Enter Course Name');


  writeln('Enter Course Grade');


  writeln('Enter Exam Grade');







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



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


  sum:=Cgradepoint + Egradepoint;

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


  if sum >= A


  writeln('Grade letter is: A')


  if sum >= B


  writeln('Grade letter is:B')


  if sum >= C


  writeln('Grade letter is:C')


  if sum >= D


  writeln ('Grade letter is:D')





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.