Habit I guess.Thanks.
Type: Posts; User: einar123
Habit I guess.Thanks.
I'm thinking if Im using StdIn why do I need:
int N = Integer.parseInt(args[0]);
int compare = Integer.parseInt(args[1]);
Is there another way of programming this, with the StdIn?
Thanks. It's almost solved, so to speak. I have feeling the professor wont give correct for this code.
I don't understand WHY do I need to input string(just some numbers) at the command line and...
When I put some integers in args I press enter, then ctr z and out comes the error:
Exception in thread"Main java.util.NoSouch.ElementException at Java.util.Svanner.thrown for(Unknown Source)
Why...
Try to compress your code a little bit, so it will be better to read.
I'm not sure if you need to import all that stuff, try looking at that.
I'm writing a code that is supposed to filter a thread of integers so that repeated values are removed
public class AboveBeyondPossible {
public static void main(String[] args) {
...
I did the trace. It's solved. With an if loop at the bottom.
Hi. This where I'm at right now.
The error comes when I test for sequence 1 3 3 5 4 2 3
package forrit;
public class Verkefni2tplus {
Ok. I have a string in the array?
--- Update ---
Whitespace?
--- Update ---
It's the commas!
Thanks jps. I think directly. But my program is not correct. I'll put up a new post.
--- Update ---
The invariant is supposed to be something like this:
1.F-->I
2.I ^ not R}S{I}
3.I ^...
Ok. Does anyone in Java-universe know why this code is giving 5 for this sequence:
0,0,5,79,8,8,7,4
--- Update ---
Ahh-sorry-that is correct?!
--- Update ---
I'm wondering. This is a...
Mr.Jps. I find it so difficult to read this kind a stuff...I'll always get the sleepreading syndrome we see this, and just give up. Sort of like when I read my terrible tabing(syntax) in me last...
Ok. Is this as bad as the last one?
And is'nt this the: We solve your homework forum?
package forrit;
public class Longesdecreasingttt {
public static void main(String[] args) {
Ok. Would you give correct for doing it this way?
public class LongestDecreasing {
public static void main(String[] args) {
int N = args.length;
int[] a = new int[N];
...
My problem now is that I dont ,,take'' the number in a0. But I feel like I'll have to have i=1 because if I have i=0 then I'm out of bounds....but then again I'm out of bounds at the other end...
hahahah I'l admit that I'm forum timid
GregBrannon. The System.out print...I'm just not cutting it
args should be = i
I think I'm almost there.
How can I fix this code so that it works?
public class VectorDecreasing {
public static void main(String[] args) {
int N = args.length;
...
Excuse me. Code tags? I did highlight. Do you mean like explanation in the code itself? Meesa don't understand this.
My problem is I dont know where start really. Not asking for soloution, just...
Just started to work at this problem.
Any suggestions?
public class LongestDecreasing {
public static void main(String[] args) {
Yes it's solved. It's supposed to be like this
Your a big help. Thanks. Now it's on to the next.... After a good nights sleep.
Only one error left that has been with me all the time.
N is just some number or numbers, proferable N>0.
I have to sqare the distance and print it out.
GregBrannon are you online like 24h?)...
I'm taking a course. Apparantly my professor only wants to see that I can apply the formula. Which I have done. But I wonted the code to work.
public class Euclediand{
public static...