It is currently Mon Apr 21, 2014 7:20 am

All times are UTC - 5 hours



Forum rules


1.) No trolling. If you cant have fun without being a jerk to others, find some other forum to QQ
2.) No inappropriate/vulgar/sexually explicit posting. Staff reserves the right to deem anything they see fit as inappropriate.
3.) Have fun and don't post anything not geared at having fun!
4.) Please respect staff members and their decisions at all times. If you cannot accept a staff or moderator decision, please appeal to admin Seth.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Does anyone know Java?
PostPosted: Thu Jan 28, 2010 4:33 pm 
First Lieutenant
First Lieutenant
 Profile

Joined: Sun May 31, 2009 9:04 pm
Posts: 567
Gender: male
If you do, I need help :(

I'm doing a project for my programming class and can't seem to figure out how to put the idea into code. I want to make a game where a random number comes up from 1-20, exclusive, and the person has to guess whether the next one will be higher or lower.

This is what I have so far lol.....

Code:
   import java.util.*;
   import javax.swing.*;
public class Extra_Credit {
   
    public static void main(String[] args) {
   
    int count=0; // how many correct ans
    int max = 10; //max num of questions
    int index = 0; //to choose question
    Random r = new Random();   
    Integer[] numbers={
       new Integer(1),
       new Integer(2),
       new Integer(3),
       new Integer(4),
       new Integer(5),
       new Integer(6),
       new Integer(7),
       new Integer(8),
       new Integer(9),
       new Integer(10),
       new Integer(11),
       new Integer(12),
       new Integer(12),
       new Integer(13),
       new Integer(14),
       new Integer(15),
       new Integer(16),
       new Integer(17),
       new Integer(18),
       new Integer(19),
       new Integer(20)};
    }
}

_________________
Image

Image

I can't play for CRAP


Top
 

 Post subject: Re: Does anyone know Java?
PostPosted: Sat Jan 30, 2010 1:02 pm 
Major
Major
User avatar
 WWW  Profile

Joined: Wed Jun 03, 2009 6:41 am
Posts: 3020
Location: Look outside of the window, look to the tree... See the figure? That's not me.
Gender: male
Try www.w3schools.com.

Lots of usefull tutorials there...

_________________
Best Regards,

Alexander V


Image


Top
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Copyright Tacticsoft Ltd. 2008   
Updated By phpBBservice.nl