4 תשובות
באיזו שפת תכנות השיעורים?
שואל השאלה:
סי שארפ
סי שארפ
אנונימית
תעתיק את זה לקובץ טקסט כדי לראות את זה נורמאלי.
static bool function(int n) {
int[] count = new int[10];
do {
count[n%10]++;
n /= 10;
} while (n != 0);
for (int i = 0; i<10 i++)
if (count[i] > 1) return false;
return true;
}
static bool function(int n) {
int[] count = new int[10];
do {
count[n%10]++;
n /= 10;
} while (n != 0);
for (int i = 0; i<10 i++)
if (count[i] > 1) return false;
return true;
}
שואל השאלה:
תודה רבה (:
תודה רבה (:
אנונימית
באותו הנושא: