עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ריבוע קסם (פסקל)

Featured Replies

פורסם

שלום, נתנו לי תוכנית לבנות רייבוע קסם למי שלא יודע על מה מדובר אז אין טעם...

קיצר ניסתי לבנות את זה

ואני לא יודע 2 החוקים הראשונים עובדים אבל החוק השלישי לא טוב כאילו זה לא יורד שורה ואמרתי לו לרדת

עם מישהוא מוצא תבעיה תודה..


Program Kesem_Do;
Uses crt;
Const n=5;
Type
Viper=array[1..n,1..n] of integer;

Procedure Eipos(var non:viper); { Eipos Main Procedure }
var i,b:integer;
begin
for i:=1 to n do
for b:=1 to n do
non[i,b]:=0;
end;

Procedure Kesem(var non:viper); { Kesem Main Procedure }
var x,y,mone:integer;
begin { Of Kesem Procedure }
mone:=1;
x:=(n div 2)+1;
y:=1;
non[y,x]:=mone;
while mone <> n*n do
begin
inc(mone);
dec(x);
dec(y);
if y=0 then y:=n;
if x=0 then x:=n;
if non[y,x] <> 0 then inc(y);
non[y,x]:=mone;
end;
end;
var x,y:integer;
Non:Viper;
begin
Clrscr;
Eipos(Non);
Kesem(non);
for x:=1 to n do
begin
writeln;
for y:=1 to n do
begin
write(non[x,y]:n);
end;
end;


end.
/code]

פורסם

העיינים יוצאות לי מהמקום.

אתה לא יכול לעשות

[lef t] (יישור לשמאל..) בלי רווח כמובן..

:S.

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.