4 תשובות
using system;
namespace consoleapp179
{
class program
{
static void main(string[] args)
{
console.writeline("write the size of the marh");
int n = int.parse(console.readline());
int[] arr = new int[n];
for (int i = 0; i < arr.length; i++)
{
arr[i] = int.parse(console.readline());
}
int count = 0;
int[] arr2 = new int[n];
for (int i = 0; i < arr.length; i++)
{
if (arr[i] < 0)
{
count++;
arr2[i] = i;
}
}
console.writeline(" the numbers of slili " +count);
for (int i = 0; i < arr.length; i++)
{
console.writeline(arr2[i]);
}
}
}
}
אם עדיין צריך(יצרתי שני מערכים)
namespace consoleapp179
{
class program
{
static void main(string[] args)
{
console.writeline("write the size of the marh");
int n = int.parse(console.readline());
int[] arr = new int[n];
for (int i = 0; i < arr.length; i++)
{
arr[i] = int.parse(console.readline());
}
int count = 0;
int[] arr2 = new int[n];
for (int i = 0; i < arr.length; i++)
{
if (arr[i] < 0)
{
count++;
arr2[i] = i;
}
}
console.writeline(" the numbers of slili " +count);
for (int i = 0; i < arr.length; i++)
{
console.writeline(arr2[i]);
}
}
}
}
אם עדיין צריך(יצרתי שני מערכים)
ראיתי ששלחת לי הודעה בפרטי אבל אני לא יכול להגיב
כי אין לי מספיק פרחים
כי אין לי מספיק פרחים
שואל השאלה:
עכשיו יש לך בידיוק חמש, זה מספיק כדי לענות, לא?
עכשיו יש לך בידיוק חמש, זה מספיק כדי לענות, לא?
אנונימית
שואל השאלה:
וגם אם לא...ראיתי פשוט שעזרת לי ואתמול למדנו חומר חדש ואני צריכה קצת עזרה בלהבין מה הטעות בקוד שהקלדתי...תוכל אולי לעזור לי?
וגם אם לא...ראיתי פשוט שעזרת לי ואתמול למדנו חומר חדש ואני צריכה קצת עזרה בלהבין מה הטעות בקוד שהקלדתי...תוכל אולי לעזור לי?
אנונימית
באותו הנושא: