Programlama | Programlama Dilleri | C Programlama Dili |C++

Hata
  • XML Parsing Error at 1:82. Error 9: Invalid character


Y?ld?zlardan Olu?an Kare Dikdörtgen ve Üçgen Çizmek

Pascal programlama dilinde yaz?lm?? bu programda ekrana seçime göre y?ld?zlardan olu?an bir kare, üçgen veya dikdörtgen çizen prosedür yap?lm??t?r.

Program Kodu:

  1.  
  2.  
  3. uses crt;
  4. var
  5. i,j,n,m:integer;
  6. tus:char;
  7.  
  8. procedure ucgen;
  9. begin
  10. write('ucgen satir sayisini gir : ');
  11. readln(n);
  12. clrscr;
  13. for i:=1 to n do begin
  14. for j:=1 to i do begin
  15. write('* ');
  16. writeln;
  17. readln;
  18.  
  19. procedure kare;
  20. begin
  21. writeln('kare satir sayisini gir : ');
  22. readln(n);
  23. clrscr;
  24. for i:=1 to n do begin
  25. for j:=1 to n do begin
  26. write('* ');
  27. writeln;
  28. readln;
  29.  
  30. procedure dikdortgen;
  31. begin
  32. writeln('dikdortgen satir sayisini giriniz : ');
  33. readln(n);
  34. writeln('dikdortgen sutun sayisini giriniz : ');
  35. readln(m);
  36. clrscr;
  37. for i:=1 to n do begin
  38. for j:=1 to m do begin
  39. write('* ');
  40. writeln;
  41. readln;
  42.  
  43. begin
  44. clrscr;
  45. repeat
  46. writeln('Cizmek istediginiz sekli seciniz.. [1:Kare,2:Dikdortgen,3:Ucgen] :');
  47. readln(n);
  48.  case n of
  49.  1 : kare;
  50.  2 : dikdortgen;
  51.  3 : ucgen;
  52.  
  53. writeln('Cikmak icin * karakterine basiniz.. ');
  54. tus:=readkey;
  55. until tus='*';
  56.  
  57.  
  58.  
  59.  

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
 
404 Not Found

404

Not Found

The resource requested could not be found on this server!


Proudly powered by LiteSpeed Web Server

Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.