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

פורסם

זה נשמע כמו משפט כזה שאומרים למי שאומר שלא צריך להמציא את הגלגל מחדש...

פורסם

את האמת ראיתי שכולם דיברו על השיטה ולא רשמו לבן אדם איך עושים את זה...

גם אם אני טועה שיהיה לו לבריאות

נ.ב עשיתי את זה לא כל כך אלגנטי אבל אני לא יודע איך בנויה האפליקציה שלך.

number = המספר שלך

tempnumber = לא להרוס את המספר המקורי

stoper = שהלולאה לא תרוץ סתם יותר מידי פעמים (יכולתי לשים שם גם דגל בוליאני אבל לא היה לי כוח)

int number = 123456789;

int tempnumber = number;

int temp = 0;

int stopper = 1;

for (int i = 0; stopper != 0; i++)

{

temp = ((tempnumber) % 10);

if (temp == 8)

{

Console.WriteLine("There is an 8 in the number");

stopper = 0;

}

tempnumber /= 10;

}

ארכיון

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

דיונים חדשים

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.