עבור לתוכן
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

פורסם

קודם כל השאלה:

נתון מערך באורך של N מספרים טבעיים. כתוב תוכנית המחשבת ומדפיסה את אורך תת-הסדרה הארוכה ביותר, אשר מופיעה גם בהתחלת המערך (החל מהאיבר הראשון) וגם בסופו (כלה באיבר האחרון). לדוגמא: אם המערך מכיל

7,4,5,3,1,9,2,7,4,5,3 התשובה היא 4, כי תת הסדרה הארוכה ביותר היא 7,4,5,3

זה דחוף כי זה למחר ולגמרי שכחתי מזה וזאת עבודה עם ציון..

מישהו יכול לעזור ומהר??

תודה מראש

פורסם

בבקשה: (אין לי פסקל, אז יכולות להיות כמה שגיאות סינטאקס פה ושם...)


Const
N = ?;
Var
Arr[0..N]: Integer
Found: integer;
ExWhile: Boolean;
I,J: Integer;
Begin
Found = 0;
cont = True
For i = 0..(N - 1) Do Begin
If (Arr[i]=Arr[N]) Then Begin
J = i;
ExWhile = True;
While ((J >= 0) And (ExWhile = True)) Do Begin
If (Arr[J]<>Arr[N+J-i]) Then
ExWhile=False;
J=J-1;
end;
If (ExWhile=True) Then
    Found = i;
end;
end;
writeln("The Answer Is: ",Found+1);
End.

פורסם

WOW!

זה נראה שאני לא ישרוד בזה אחרי השנה (כיתה י') :lol:

פורסם

סך הכל זה לא כ"כ נורא...

ארכיון

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

דיונים חדשים

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.