Turbo Pascal – Vize Final örneği

program vizefinal;
var
  ad:string[20];
  v,f,b:integer;
  bn:real;
  cv:char;
label 10,20;
begin
10:write(‘adi soyadi..’);readln(ad);
   write(‘vize notu…’);readln(v);
   write(‘final notu…’);readln(f);
   if(f>=50) then begin
    bn:=v*0.4+f*0.6;
     if(bn>=50) then writeln(ad,’ ‘,v,’ ‘,f,’ ‘,bn:3:1)
     else goto 20;
   end
   else begin
20: write(‘butunleme notunu gir..’);readln(b);
    if(b>=50) then begin
     bn:=v*0.4+b*0.6;
      if(bn>=50) then writeln(ad,’ ‘,v,’ ‘,b,’ ‘,bn:3:1)
      else writeln(ad,’ ‘,v,’ ‘,b,’ ‘,’basarisiz’);
    end
    else writeln(ad,’ ‘,v,’ ‘,b,’ ‘,’basarisiz’);
   end;
  write(‘baska bir ogrencinin durumu hesaplanacakmi?(e/h)’);
  readln(cv);
  if((cv=’E’)or(cv=’e’)) then goto 10;
 readln;
end.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)