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

פורסם

שלום!,

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

איך עושים?

ד"א

הכל בConsole Application,

תודה,

Aviko

פורסם

תקרא מחרוזת עם

Console.ReadLine();

אחרי זה אתה יכול לגשת לכל תו במחרוזת ע"י ציון המיקום שלו (אתה יכול לעשות לולאה שסורקת את האינדקס לפי האורך וניגשת לכל תא.

פורסם
  • מחבר

אפשרי לקבל דוגמאת קוד???,

לא כ"כ ברור לי מה אמרת...,

תודה,

Aviko

פורסם

בתקווה שהקוד הזה יעבוד...

using System;

namespace ShouldWork
{
class ATest
{
static void Main(string[] args)
{
Console.WriteLine("Type something...");
string input = Console.ReadLine();
for (int i=0;i<input.Length; i++)
{
Console.Write(input[i]);
}
}
}
}

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

פורסם
  • מחבר

לא לימדו אותנו אז...

בסדר עכשיו הבנתי את זה מעולה!.

תודה רבה לך,

Aviko

פורסם

למה לעשות לולאות?...

תקלוט מחרוזת למשתנה מסוג string (בוא נקרה לו strRealString)

ואז תעשה

char[] cChars = strRealString.toCharArray()

פשוט פקודה שמפרדת מחרוזת לכל התווים שבתוכה, ומחזירה אותם כמערך של char.

ארכיון

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

דיונים חדשים

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.