2 תשובות
שואל השאלה:
למה זה לא עבד לי?
int count = 0;
int maxy = arr.getlength(0);
int maxx = arr.getlength(1);
console.writeline("maxy" + maxy);
console.writeline("maxx" + maxx);
for (int y = 0; y < maxx; y++)
{
count = count + arr[0, y];
}
for (int a = 0; a < maxx; a++)
{
count = count + arr[maxy - 1, a];
for (int x = 0; x < maxy; x++)
{
count = count + arr[x, 0];
}
for (int b = 0; b < maxx; b++)
{
count = count + arr[b, maxx-1 ];
}
count = count - arr[0, 0];
count = count - arr[0, maxx - 1];
count = count - arr[maxy - 1, maxx - 1];
count = count - arr[maxy - 1, 0];
מאקס איקס זה ה arr.getlength(0);כלומר מספר השורות והמאקס וואי זה ההפך כלומר מספר העמודות
למה זה לא עבד לי?
int count = 0;
int maxy = arr.getlength(0);
int maxx = arr.getlength(1);
console.writeline("maxy" + maxy);
console.writeline("maxx" + maxx);
for (int y = 0; y < maxx; y++)
{
count = count + arr[0, y];
}
for (int a = 0; a < maxx; a++)
{
count = count + arr[maxy - 1, a];
for (int x = 0; x < maxy; x++)
{
count = count + arr[x, 0];
}
for (int b = 0; b < maxx; b++)
{
count = count + arr[b, maxx-1 ];
}
count = count - arr[0, 0];
count = count - arr[0, maxx - 1];
count = count - arr[maxy - 1, maxx - 1];
count = count - arr[maxy - 1, 0];
מאקס איקס זה ה arr.getlength(0);כלומר מספר השורות והמאקס וואי זה ההפך כלומר מספר העמודות
אנשים פה לא מבינים מה זה בננה את שואלת אותם על סי שארפ חחח
אני יכולה לתת לך טלפון של מישהי שמבינה בזה
אני יכולה לתת לך טלפון של מישהי שמבינה בזה
באותו הנושא: