User Profile
Collapse
-
That is a great description of modulo division. Nicely done sir.... -
Whats your email? Shall I do your taxes for you while I'm at it?...Leave a comment:
-
in your for loop the first "something" is an integer (you want to set it to = 0). Your next is how long you want the for loop to run. So you want to use the variable you just created in the first statement to be < or > than something (hint: x <= 100). Your last stipulation is used to increment or decrement the variable.
Inside your for loop you want to use modulo division (% operator) to see if the number is odd...Leave a comment:
-
Well your going to need 2 functions. An encoding function and a decoding function. You are going to have to find a way to add an integer to a string (using scanner class to get the user input might help you on this).
Your encode function you are obviously adding 5 to each character in the string, so your decode function will naturally do the opposite (subtraction)....Leave a comment:
-
I havnt worked with 2d arrays much but line 5 looks like it has a problem....Leave a comment:
-
try doing some searching on the
isSelected method.
I had a similar problem with radio buttons not too long ago, this method solved all my problems.Leave a comment:
-
dav3 replied to hi, i have to write a program that calculates and displays numbers btw 1 and 100 inclin JavaFirst why is there a "+" in this line?
System.out.prin t("Enter an integer between" + "1 and 100;inclusive:" );
second, sum=n(n+1)/2; what is n?...Leave a comment:
-
Nicely done. Shouldnt your counter be < 5 though? Since you only wanted to print numbers 1 - 4....Leave a comment:
-
Use a for loop that has an integer variable that gets increased each time through. That would be a good start.
Also if you dont know how to use % (modular division) just do a simple google search:)...Leave a comment:
-
-
I by no means have any knowledge of this subject, or how long your sign. would be. But if its stored at the beginning of the file, could the recipient not just read the first line of the file to get the sign.?
This of course would only work if the length of the sign. was < than the size of a line.Leave a comment:
-
I think you need to move "int weight = 5;" out of your for loop and in your Math.pow line you need to use your dummy variable of "i" to increment the exponent each time....Leave a comment:
-
I highly recommend the following link. It was a great article (as is the following article on the site) on how to use JDBC
click hereLeave a comment:
-
not sure what type of data your result set is giving you but i faced a similar problem earlier this year. I was able to use an arraylist of type Double
Code:List<Double> list = new ArrayList<Double>();
NOTE: I am pretty sure you have to be using 1.5 or higher.Leave a comment:
-
i have a similiar lab using TEA, and my god am i lost, so much so that its getting pushed to the bottom of my homework pile.
Good luck to you.Leave a comment:
-
I think you want i < 8 not i < 4....
and the math will go in the for loop, not when you declare it
Code:for(int i = 0; i < 8; i++) { do your math here. }
Leave a comment:
-
well do you know how to declare a variable?
that would be step 1.
step 2 would be setting up your while loop.
Code:while( variable < some value) { do something Increment counter }
Leave a comment:
-
-
read this
Great article with a very simple example that is easy to implement yourself. (uses Microsoft Access as the database)Leave a comment:
-
Could you use string tokenizer when reading in the file, then just output token1,token2,t oken3,token4?Leave a comment:
No activity results to display
Show More
Leave a comment: