0

What is the wrong in this Pascal code?? I cant find. Help me.

program Gradeforamarks; uses crt; Var M:integer; grade:Char; begin writeln ('Enter marks'); read(M); if m>=75 then grade := 'A' else if M>=75 then grade:= 'B' else if M>=50 then grade:= 'C' else if M>=35 then grade:= 's' else grade := 'F'; writeln("grade=",grade); end.

30th Apr 2021, 8:01 AM
陽菜Yaksuka
陽菜Yaksuka - avatar
1 Odpowiedź
+ 1
I have forgotten Pascal syntax, but I see you have 2 branches checking whether <M> is greater than or equals to 75, which decides <grade> value to be 'A' or 'B'. You can put Pascal in the thread tags, rather than 'help_me' ☝
30th Apr 2021, 10:47 AM
Ipang