עבור לתוכן

איך מריצים תור ב jeliot בעיה ...

Featured Replies

פורסם

אוקי אני מנסה להריץ ב jeliot קוד

זה הקוד :

class func
{
public static void main(String[] args)
{
Queue<Integer> que = new Queue<Integer>();
que.insert(2000);
que.insert(17);
que.insert(615);
que.insert(9366);
que.insert(48);
System.out.println(secret2(que));
}
public static int max(int n1, int n2)
{
if (n1>n2) return n1;
return n2;
}

public static int secret1 (int n)
{
if (n/10==0) return n;
return max ( n%10 , secret1(n/10));
}
public static int secret2 ( Queue<Integer> q)
{
if ( q.isEmpty()) return 0;
int x=secret1( q.remove());
return x + 10 * secret2(q);
}

}

והוא מראה שגיאה כזאתי

Syntax Error
Line 7, Column 1:
Expression statement required

זה השורה :

Queue<Integer> que = new Queue<Integer>();

ושאני שם לו את המחלקות של queue ו node זה עדיין מראה שגיאות :\

ארכיון

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

דיונים חדשים