I need to make a 'Calculator' that works out and average for 3 different marks.
procedure TForm1.btnAddClick(Sender: TObject);
var
sName : string;
iprac, itheory, iproject : integer;
begin
sName := edtStudentName.text;
iprac := sedPrac.value;
iTheory := sedTheory.Value;
iProject := sedProject.Value;
lblOutput.caption := sName + ' You got ' + IntToStr (iPrac + iTheory + iProject) / 3;
end;
end.
Thats the code so far, but I get an error:
[Error] ComputerStudyMarks_u.pas(46): Incompatible types: 'String' and 'Integer'
Please be patient with me! I am a hardcore noob but this is for school. Maybe someone can help me with this program. I am busy using the book "Enjoy Delphi" and the code I am copying from the book itself is giving me an error. Any help would be much appreciated! P.S I cant add a picture of the form because I dont have enough reputation :(