Programalama > PASCAL

Etiketler: degerine, göre, direnç, renk, kodu

Ort. 0
Puan ver:
{Okul &&&&& NURTEN YET˜MO¦LU ANADOLU B˜LG˜SAYAR MESLEK L˜SES˜   }
{Pro§ram Hazrlayan &&&&&   Samet A€IKG™Z   }
{Email  &&&&& sametacikgoz@hotmail.com   }
program direnchesaplama;
uses crt;
procedure be;
begin
textbackground(0);
end;
var  k:byte;    tus:char;   c:string;    b:integer;           tol:string;
s:string; z:word; m:integer;   label samet;
begin samet: clrscr;
gotoxy(1,2);textcolor(white); write('Ohm Cinsinden De§er Giriniz=');readln(s);
clrscr;

textcolor(yellow);  gotoxy(1,1);
 writeln('Ltfen tolerans de§erini -+%10 veya -+%5 veya -+%2 veya -+%11 veya -+%0,5 veya ');
 writeln('-+%0,25 Ÿeklinde girmelisiniz');
textcolor(white); gotoxy(1,3); write('Direncin toleransn giriniz=');
readln(tol);
clrscr;
if tol='-+%10' then begin
textcolor(15);GOTOXY(54,3);write(#219#219);
 textcolor(15);GOTOXY(54,4);write(#219#219)
                        end;
 if tol='-+%5' then begin
textcolor(yellow);GOTOXY(54,3);write(#219#219);
 textcolor(yellow);GOTOXY(54,4);write(#219#219)
                        end;
if tol='-+%11' then begin
textcolor(6);GOTOXY(54,3);write(#219#219);
 textcolor(6);GOTOXY(54,4);write(#219#219)
                        end;
                        if tol='-+%2' then begin
textcolor(4);GOTOXY(54,3);write(#219#219);
 textcolor(4);GOTOXY(54,4);write(#219#219)
                        end;
 if tol='-+%0,5' then begin
textcolor(2);GOTOXY(54,3);write(#219#219);
 textcolor(2);GOTOXY(54,4);write(#219#219)
                        end;

 if tol='-+%0,25' then begin
textcolor(blue);GOTOXY(54,3);write(#219#219);
 textcolor(blue);GOTOXY(54,4);write(#219#219)
                        end;
b:=length(s);

if b=2 then begin
c:=copy(s,1,1);
               val(c,z,m);

if z=1 then begin
textcolor(6);GOTOXY(42,3);write(#219#219);
 textcolor(6);GOTOXY(42,4);write(#219#219);
 end;if z=2 then
  begin GOTOXY(42,3);textcolor(red);
  write(#219#219);GOTOXY(42,4);textcolor(red); write(#219#219);
end;if z=3 then
begin GOTOXY(42,3);textcolor(3); write(#219#219);GOTOXY(42,4);textcolor(3); write(#219#219);
gotoxy(39,8);write('Turuncu');end;
if z=4 then
begin GOTOXY(42,3);textcolor(14); write(#219#219);
GOTOXY(42,4);textcolor(14);
write(#219#219);end;
if z=5 then
begin GOTOXY(42,3);textcolor(2); write(#219#219);
GOTOXY(42,4);textcolor(2);
write(#219#219);end;
if z=6 then
 begin GOTOXY(42,3);textcolor(1); write(#219#219);
GOTOXY(42,4);textcolor(1);
 write(#219#219);end;
 if z=7 then
 begin GOTOXY(42,3);textcolor(9);
  write(#219#219);
GOTOXY(42,4);textcolor(9);
write(#219#219);end;
if z=8 then begin GOTOXY(42,3);textcolor(8); write(#219#219);
GOTOXY(42,4);textcolor(8); write(#219#219);end;if z=9 then begin GOTOXY(42,3);textcolor(white); write(#219#219);
GOTOXY(42,4);textcolor(white); write(#219#219);end;

c:=copy(s,2,1);
val(c,z,m);
if z=1 then
begin gotoxy(50,3);textcolor(0);write(#219#219);
gotoxy(50,4);textcolor(0);write(#219#219);
gotoxy(46,3);textcolor(6);
write(#219#219);gotoxy(46,4);
textcolor(6);write(#219#219);end;
if z=2 then
begin gotoxy(50,3);textcolor(0);write(#219#219);
gotoxy(50,4);
textcolor(0);write(#219#219);
gotoxy(46,3);textcolor(4);write(#219#219);gotoxy(46,4);textcolor(4);write(#219#219);
end;
if z=3 then begin
gotoxy(46,3);textcolor(3);write(#219#219);
gotoxy(46,4);textcolor(3);write(#219#219);end;
if z=4 then
begin gotoxy(46,3);textcolor(14);write(#219#219);
gotoxy(46,4);textcolor(14);write(#219#219);end;
if z=5 then
begin gotoxy(46,3);textcolor(2);write(#219#219);gotoxy(46,4);textcolor(2);write(#219#219);end;
if z=6 then
begin gotoxy(46,3);textcolor(1);
write(#219#219);gotoxy(46,4);
textcolor(1);write(#219#219);end;
if z=7 then
begin gotoxy(46,3);textcolor(9);write(#219#219);
gotoxy(46,4);textcolor(9);write(#219#219); end;

end;

c:=copy(s,1,1);
val(c,z,m);

if z=0 then begin write('Ltfen Do§ru De§er Giriniz'); delay(2500);
goto samet; end;
if z=1 then begin textcolor(6);
GOTOXY(42,3);write(#219#219); textcolor(6);GOTOXY(42,4);write(#219#219);
 end;if z=2
 then begin GOTOXY(42,3);textcolor(red); write(#219#219);GOTOXY(42,4);textcolor(red); write(#219#219);
end;
if z=3 then
begin GOTOXY(42,3);textcolor(3); write(#219#219);
GOTOXY(42,4);textcolor(3); write(#219#219);
gotoxy(39,8);
write('Turuncu');end;if z=4 then
begin GOTOXY(42,3);textcolor(14);
 write(#219#219);
GOTOXY(42,4);textcolor(14);
write(#219#219);end;if z=5 then
begin GOTOXY(42,3);textcolor(2); write(#219#219);
GOTOXY(42,4);textcolor(2);
write(#219#219);end;if z=6 then
begin GOTOXY(42,3);textcolor(1); write(#219#219);
GOTOXY(42,4);textcolor(1);
write(#219#219);end;
if z=7 then
 begin GOTOXY(42,3);textcolor(9); write(#219#219);
GOTOXY(42,4);textcolor(9);
 write(#219#219);end;if z=8 then
 begin GOTOXY(42,3);textcolor(8); write(#219#219);
GOTOXY(42,4);textcolor(8);
write(#219#219);end;
if z=9 then begin
GOTOXY(42,3);textcolor(white); write(#219#219);
GOTOXY(42,4);textcolor(white);
write(#219#219);end;


c:=copy(s,2,1);val(c,z,m);

if z=1 then begin
gotoxy(46,3);textcolor(6);
write(#219#219);gotoxy(46,4);textcolor(6);write(#219#219);end;
if z=2 then
begin gotoxy(46,3);textcolor(4);write(#219#219);
gotoxy(46,4);textcolor(4);write(#219#219);end;
if z=3 then
begin gotoxy(46,3);textcolor(3);
write(#219#219);gotoxy(46,4);
textcolor(3);write(#219#219);end;
if z=4
then begin gotoxy(46,3);textcolor(14);
write(#219#219);gotoxy(46,4);
textcolor(14);write(#219#219);end;
if z=5 then
begin gotoxy(46,3);textcolor(2);
write(#219#219);gotoxy(46,4);textcolor(2);write(#219#219);end;
if z=6 then begin
gotoxy(46,3);textcolor(1);
write(#219#219);gotoxy(46,4);textcolor(1);write(#219#219);end;
if z=7 then begin
gotoxy(46,3);textcolor(9);write(#219#219);
gotoxy(46,4);textcolor(9);write(#219#219);

end;
if z=8 then begin
gotoxy(46,3);textcolor(8);write(#219#219);
gotoxy(46,4);textcolor(8);write(#219#219);

end;
if z=9 then begin
gotoxy(46,3);textcolor(white);write(#219#219);
gotoxy(46,4);textcolor(white);write(#219#219);

end;
c:=copy(s,2,1);
val(c,z,m);
if z=0 then begin
 gotoxy(45,9);textcolor(white); write('Siyah');
end;

c:=copy(s,3,1);
val(c,z,m);
if z<>0 then begin
textcolor(white); gotoxy(1,10);
write('Girilen De§erin 3. rakam 0 ˜le BaŸlamaldr.');
gotoxy(1,11);write('Girdiniz Diren‡ Karbon Diren‡tir.');
end;

c:=copy(s,3,1);
if c='0' then begin

gotoxy(50,3);textcolor(6);write(#219#219);
gotoxy(50,4);textcolor(6);write(#219#219);
end;


 c:=copy(s,4,1);
val(c,z,m);
if z<>0 then    begin
  goto samet;     end;
 c:=copy(s,5,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;
 c:=copy(s,6,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;
 c:=copy(s,7,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;
 c:=copy(s,8,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;
 c:=copy(s,9,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;
 c:=copy(s,10,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;
 c:=copy(s,11,1);
val(c,z,m);
if z<>0 then  begin
goto samet; end;

 c:=copy(s,3,1);

if c='0'then begin
val(c,z,m);

if b=4 then begin
gotoxy(50,3);textcolor(4);write(#219#219);
gotoxy(50,4);textcolor(4);write(#219#219);

 end;
if b=5 then begin
gotoxy(50,3);textcolor(3);
write(#219#219);
gotoxy(50,4);textcolor(3);
write(#219#219);
gotoxy(48,8);write('Turuncu');
 end;
 if b=6 then begin
gotoxy(50,3);
textcolor(14);write(#219#219);
gotoxy(50,4);textcolor(14);write(#219#219);

 end;
 if b=7 then begin
gotoxy(50,3);textcolor(2);write(#219#219);
gotoxy(50,4);textcolor(2);write(#219#219);

 end;
 if b=8 then begin
gotoxy(50,3);textcolor(1);write(#219#219);
gotoxy(50,4);textcolor(1);write(#219#219);

 end;
 if b=9 then begin
gotoxy(50,3);textcolor(9);write(#219#219);
gotoxy(50,4);textcolor(9);write(#219#219);

 end;
 if b=10 then begin
gotoxy(50,3);textcolor(8);write(#219#219);
gotoxy(50,4);textcolor(8);write(#219#219);

 end;
 if b=11 then begin
gotoxy(50,3);textcolor(15);write(#219#219);
gotoxy(50,4);textcolor(15);write(#219#219);

 end;



            end;



textcolor(15);  gotoxy(40,1);write('RESISTANTS(D˜REN€)') ;
gotoxy(1,1);write('                                     ');

for k:=1 to 12 do begin
gotoxy(28+k,3);write(#205); end;


gotoxy(40,3);write(#186);
gotoxy(40,4);write(#186);
gotoxy(40,5); write(#200);
for k:=1 to 15 do begin
gotoxy(40+k,5);write(#205); end;

for k:=1 to 15 do begin
gotoxy(40+k,2);write(#205); end;
gotoxy(40,2);write(#201);
gotoxy(44,2);write(#203);
gotoxy(44,5);write(#202);
gotoxy(44,3);write(#186);
gotoxy(44,4);write(#186);
gotoxy(44,5); write(#188);

for k:=1 to 12 do begin
gotoxy(57+k,3);write(#205); end;
gotoxy(41,5);write(#202);
gotoxy(41,2);write(#203);

gotoxy(41,3);write(#186);
gotoxy(41,4);write(#186);
gotoxy(45,5);write(#202);
gotoxy(44,5);write(#202);
gotoxy(45,2);write(#203);

gotoxy(45,3);write(#186);
gotoxy(45,4);write(#186);

gotoxy(48,2);write(#203);
gotoxy(48,3);write(#186);
gotoxy(48,4);write(#186);
gotoxy(48,2);write(#203);
gotoxy(48,5);write(#202);

gotoxy(49,2);write(#203);
gotoxy(49,5);write(#202);
gotoxy(49,3);write(#186);
gotoxy(49,4);write(#186);
gotoxy(49,2);write(#203);
gotoxy(49,5);write(#202);
gotoxy(49,3);write(#186);
gotoxy(49,4);write(#186);
gotoxy(52,2);write(#203);
gotoxy(52,5);write(#202);
gotoxy(52,3);write(#186);
gotoxy(52,4);write(#186);
gotoxy(53,2);write(#203);
gotoxy(53,5);write(#202);
gotoxy(53,3);write(#186);
gotoxy(53,4);write(#186);

gotoxy(56,2);write(#203);
gotoxy(56,5);write(#202);
gotoxy(56,3);write(#186);
gotoxy(56,4);write(#186);
gotoxy(57,2);write(#203);
gotoxy(57,5);write(#202);
gotoxy(57,3);write(#186);
gotoxy(57,4);write(#186);
gotoxy(57,2);write(#187);
gotoxy(57,5);write(#188);
{yaz}
gotoxy(42,6);write(#25);
gotoxy(42,7);write('R1');
gotoxy(50,6);write(#25);
gotoxy(50,7);write('R3');
gotoxy(46,6);write(#25);
gotoxy(46,7);write('R2');
gotoxy(54,6);write(#25);
gotoxy(53,7);write('Tolerans');
if b>11 then begin
gotoxy(1,10);
textcolor(white); write('Ltfen sonu 9 haneli rakam ge‡mesin');
gotoxy(50,3);textcolor(0);write(#219#219);
gotoxy(50,4);textcolor(0);write(#219#219);
delay(2500); goto samet;
end;
tus:=readkey;        clrscr;
gotoxy(1,1);write('Okul &&&&& NURTEN YET˜MO¦LU ANADOLU B˜LG˜SAYAR MESLEK L˜SES˜   ');
gotoxy(1,20); writeln('Pro§ram Hazrlayan &&&&&   Samet A€IKG™Z  &&&&& ');
write('Email  &&&&& sametacikgoz@hotmail.com   ');


 readln; end.


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2019 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.