31 Oca 2012 @ 9:00 PM 
 

Klavyeden girilecek şekilde n basamaklı x’e bölünemeyen y. sayıyı yazan program.

 

uses crt;
var
son,ilk,i,b:real;
sayac,n,x,y:integer;
begin
clrscr;
write(‘basamak sayısını gir:’);readln(n);
write(‘bölüm sayısını gir:’);readln(x);
write(‘kaçıncı sayı:’);readln(y);
son:=exp(n*ln(10)-1);
ilk:=exp((n-1)*ln(10));
sayac:=0;
i:=ilk;
while i<son do begin
b:=i;
while b>=x do
b:=b-x;
if (b>=1) then
sayac:=sayac+1;
if (sayac=y) then begin
writeln(i:0:0);break;end;
i:=i+1;end;
readln;
end.

Tags Kategori: Pascal Programlama Konu Sahibi: NIKIMLOSAC
En son düzenleme: 31 Oca 2012 @ 09 00 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.