Results 1 to 16 of 16
Thread: java arrays
- 03-18-2010, 03:26 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 50
- Rep Power
- 0
- 03-18-2010, 03:28 PM #2
Cool! Do you have a question?
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-18-2010, 03:36 PM #3
Member
- Join Date
- Mar 2010
- Posts
- 50
- Rep Power
- 0
??
i don't knew how the check if the num are equal
??????
- 03-18-2010, 03:37 PM #4
How would you do it on a piece of paper?
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-18-2010, 03:42 PM #5
Member
- Join Date
- Mar 2010
- Posts
- 50
- Rep Power
- 0
on eclipse
public class Ex7Qu3 {
public static void main(String[] args) {
int num3;
int[] num1 = new int[10];
for (int i = 0; i < num1.length; i++) {
num1[i] = (int) (Math.random() * 10);
System.out.print(num1[i]);
- 03-18-2010, 03:55 PM #6
Wow, when I do that on a piece of paper, I'd take the first number and print it, then strike all other occurances of that number, then I'd take the next number and do the same with that one. But that might just be me.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-18-2010, 04:17 PM #7
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
Yeah, I think I'd just take a look just before I wrote it down to see if it's on the list of numbers I've written down already.
-Gary-
- 03-18-2010, 04:21 PM #8
Yup, that's possible too, just that you cannot really look what you have written from a program, unless you've stored the written numbers somewhere ;)
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-18-2010, 04:25 PM #9
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
- 03-18-2010, 04:25 PM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 03-18-2010, 04:26 PM #11
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-18-2010, 04:30 PM #12
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 03-18-2010, 04:51 PM #13
Member
- Join Date
- Mar 2010
- Posts
- 50
- Rep Power
- 0
code please :)
- 03-18-2010, 04:56 PM #14
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
No. This forum isn't for other people to do your homework for you. You've actually gotten two completely valid and helpful answers in this thread already.
Wow, when I do that on a piece of paper, I'd take the first number and print it, then strike all other occurances of that number, then I'd take the next number and do the same with that one. But that might just be me.Writing the code is your job. Show us your best effort, and we may be able to help you find your mistakes.Yeah, I think I'd just take a look just before I wrote it down to see if it's on the list of numbers I've written down already.
-Gary-
- 03-18-2010, 04:56 PM #15
EDIT: what Gary said.
Last edited by PhHein; 03-18-2010 at 04:57 PM. Reason: duplicate answer removed.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-18-2010, 05:17 PM #16
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Java arrays (not sure if this question is advanced)
By aga010607 in forum Advanced JavaReplies: 1Last Post: 11-24-2009, 01:43 PM -
Indexing java arrays with string
By Jackblue in forum Advanced JavaReplies: 10Last Post: 09-30-2009, 01:48 PM -
arrays in java
By mayhewj7 in forum New To JavaReplies: 4Last Post: 12-17-2008, 03:48 AM -
Help needed with java arrays code
By d24706 in forum New To JavaReplies: 2Last Post: 03-07-2008, 01:11 AM -
Arrays in Java
By hiranya in forum New To JavaReplies: 3Last Post: 07-30-2007, 09:10 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks