Can anyone find out the mistake from my code ?
My answer is not accepted … help me out please
1–> is it the same code that you submitted ?
Invocation failed [COMPILATION_ERROR]
Can’t compile file:
Codechef.java:1: error: expected
import java.util.;
^
Codechef.java:2: error: expected
import java.lang.;
^
Codechef.java:13: error: ‘;’ expected
for(j=2(n-i); j>=0; j??“)
^
Codechef.java:13: error: not a statement
for(j=2(n-i); j>=0; j??“)
^
Codechef.java:13: error: ‘)’ expected
for(j=2(n-i); j>=0; j??“)
^
Codechef.java:13: error: illegal character: ‘\u201c’
for(j=2(n-i); j>=0; j??“)
^
Codechef.java:13: error: not a statement
for(j=2(n-i); j>=0; j??“)
^
Codechef.java:14: error: unclosed string literal
System.out.print(" ???);
^
Codechef.java:14: error: ‘;’ expected
System.out.print(" ???);
^
Codechef.java:15: error: ‘)’ expected
for(j=0; j<=i; j++)
^
Codechef.java:15: error: not a statement
for(j=0; j<=i; j++)
^
Codechef.java:15: error: not a statement
for(j=0; j<=i; j++)
^
Codechef.java:15: error: ‘;’ expected
for(j=0; j<=i; j++)
^
Codechef.java:16: error: unclosed string literal
System.out.print(???* ");
^
Codechef.java:16: error: ‘;’ expected
System.out.print(???* ");
^
Codechef.java:17: error: illegal start of expression
System.out.println();
^
Codechef.java:17: error: ‘;’ expected
System.out.println();
^
17 errors
File should contain public class named as the file.
=====
Used: 0 ms, 0 KB
-----provide the same code that you submitted
Timely reminder to please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile!
is one of the reasons your code isn’t working, change j=2(n-i)
to j=2*(n-i)
.
Also import java.util.
doesn’t make any sense, I guess you meant import java.util.*
, if you check the compiler errors, the compiler says <identifier> expected
.
Format your code, otherwise there will be a lot more comments like the 2nd one or the 4th one.
Well , I think there had some issues while copying the code …
Here’s my code : CodeChef: Practical coding for everyone
Clicking on this link says Access denied! You don't have permissions for this page.
but any who my previous answer almost says all the changes to be made, now I can’t see your solution since you removed it, the last thing I saw was that your whole code was basically a comment, you forgot to do */
after /* Name of the class has to be “Main” only if the class is public. /
Also your code contains a lot of different Unicode characters that look almost the same, seems like a prank.
Well if you’re not really trying to prank us, rewriting the code will be better in my opinion.
I am a newbie in codechef … how do i share my submission ? why would I even prank…
I didn’t say that you were trying to prank, I said it seems like a prank, but anyways, I don’t think you can share share the solution link, the view buttons on the solutions are greyed out.
My code is alright …there’s some problem in spaces or something , thats the reason they cant evaluate properly … [I just started doing codechef 2 days back ,so do excuse me I’m a noob]
Okay, I guess, but to me that doesn’t seem to be the problem though.
guys I appreciate everybody’s help. I would like you guys I have found my error. Thanks everyone
yeah … it was mangled by the forum software. But i found my mistake … and its solved