31 Oca 2012 @ 8:59 PM 
 

Direnç koduna göre rengini veren program(kısaltılmış).

 

uses crt;
var
y,i:integer;
x,renk,r1,r2,r3:string;
begin
clrscr;
writeln(‘direnç kodunu gir:’);readln(x);
r1:=copy(x,1,1);
r2:=copy(x,2,1);
str(length(x)-2,r3);
i:=0;
while i<3 do begin
i:=i+1;
case i of
1:renk:=r1;
2:renk:=r2;
3:renk:=r3;
end;
if(renk=’0′)then write(‘ siyah’);
if(renk=’1′)then write(‘ kahverengi’);
if(renk=’2′)then write(‘ kırmızı’);
if(renk=’3′)then write(‘ turuncu’);
if(renk=’4′)then write(‘ sarı’);
if(renk=’5′)then write(‘ yeşil’);
if(renk=’6′)then write(‘ mavi’);
if(renk=’7′)then write(‘ mor’);
if(renk=’8′)then write(‘ gri’);
if(renk=’9′)then write(‘ beyaz’);
end;
readln;
end.

Tags Kategori: Pascal Programlama Konu Sahibi: NIKIMLOSAC
En son düzenleme: 31 Oca 2012 @ 08 59 PM

EmailPermalink
 

Responses to this post » (None)

 

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

\/ More Options ...
Change Theme...
  • Users » 1
  • Posts/Pages » 310
  • Comments » 5
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Pascal Örnekleri



  • No Child Pages.

Wp eklenti listesi



  • No Child Pages.