uses crt;
var
x,c:integer;
a,b,kod:string;
begin
clrscr;
writeln('direnç kodunu gir:');readln(kod);
x:=length(kod);
a:=copy(kod,1,1);
b:=copy(kod,2,1);
c:=length(kod)-2;
if(a='0')then write('siyah');
if(a='1')then write('kahverengi');
if(a='2')then write('kırmızı');
if(a='3')then write('turuncu');
if(a='4')then write('sarı');
if(a='5')then write('yeşil');
if(a='6')then write('mavi');
if(a='7')then write('mor');
if(a='8')then write('gri');
if(a='9')then write('beyaz');
if(b='0')then write(' siyah');
if(b='1')then write(' kahverengi');
if(b='2')then write(' kırmızı');
if(b='3')then write(' turuncu');
if(b='4')then write(' sarı');
if(b='5')then write(' yeşil');
if(b='6')then write(' mavi');
if(b='7')then write(' mor');
if(b='8')then write(' gri');
if(b='9')then write(' beyaz');
if(c=0)then write(' siyah');
if(c=1)then write(' kahverengi');
if(c=2)then write(' kırmızı');
if(c=3)then write(' turuncu');
if(c=4)then write(' sarı');
if(c=5)then write(' yeşil');
if(c=6)then write(' mavi');
if(c=7)then write(' mor');
if(c=8)then write(' gri');
if(c=9)then write(' beyaz')
else
writeln('');
textcolor(yellow);
write(' <<<9 adet sıfırdan fazla değer giremezsiniz>>>'); readln;
end.
Linkback: https://www.buyuknet.com/direnc-degeri-girilip-rengini-veren-program-t10141.0.html