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

תרגיל| לוח הכפל ורקורסיה ב-C

Featured Replies

פורסם
  • מחבר

אפשר להוסיף עוד פרמטר , רק שיהיה מוגדר כבר בתוך הפונקציה ולא תתקבל מהראשי.... אני לא רואה איך פרמטר כזה יכול לעזור כי בכול קריאה רקורסיבית הפרמטר יחזור להתחלה שלו.

אפשר לעומת זאת להשתמש בפונקציה אחרת בתנאי שגם היא תהא רקורסיבית , לא עלה לי שום רעיון.

פורסם

אם הוא מוגדר רק בתוך הפונקציה אז זה לא פרמטר, זה משתנה.

תחשוב על להגדיר פונקציה רקורסיבית שמדפיסה שורה אחת מהלוח.

פורסם
  • מחבר

בסופו של דבר הגעתי לפתרון כמעט מלא .


void mult_table(int x,int base, int y){

if(base>y) return;
mult_helper(1,base,y);
}


void mult_helper(int x,int base, int y){

printf("%2d ",x*base);
if(x*base==base*y) return;
else mult_helper(++x,base,y);
if(x>2)return;
putchar('\n');
mult_table(x,++base,y);
return;
}

ארכיון

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

דיונים חדשים

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.