Search:

Type: Posts; User: mindlessn00b

Search: Search took 0.09 seconds.

  1. Replies
    1
    Views
    1,796

    Black Jack Statistics game? lost.

    Hey everyone I'm writing a program that simulates a blackjack game not a playable game but one to find the statistics if you win or lose and find the percents. This is as far as i have gotten and I'm...
  2. Replies
    6
    Views
    1,507

    Re: Returning reversed string? Help please.

    anyone got any idea?
  3. Replies
    6
    Views
    1,507

    Re: Returning reversed string? Help please.

    Okay so i think i understand this is what i came up wit but now i have main stock overflow?public class Reversed {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO...
  4. Replies
    6
    Views
    1,507

    Returning reversed string? Help please.

    Hey everyone I'm missing something small I'm trying to make a code to have you put anything in you like and then the output be the reverse of that here is the code.

    import java.util.Scanner;

    ...
  5. Replies
    4
    Views
    1,728

    Re: Stuck help please!

    Ohhhh okay thank you very much. I didn't realize it was that simple!
  6. Replies
    4
    Views
    1,728

    Re: Stuck help please!

    Okay i figured out how to do the average but i dont see why im getting the simulation loop to run twice my output is 1-20 and than 1-20 again? what am i missing?
  7. Replies
    4
    Views
    1,728

    Stuck help please!

    So I finally got the main part of my code working... have to simulate a robot taking random steps but now i cant figure out how to get the average of steps he took throughout the whole code
    ...
  8. Replies
    16
    Views
    5,558

    Re: Return from incrementing for loop?

    oh wow it was that simple!!!!! Thanks a ton Norm!!!!

    public class IntSumReturnValues {

    public static void main(String[] args) {
    int n = 100;
    // int sumLoop= ...
  9. Replies
    16
    Views
    5,558

    Re: Return from incrementing for loop?

    Okay, well thank you Norm for your help. I've changed the variable for "= sum+ i " to sumLoop and changed the return as well still having the same issue.

    I'm assuming because after it goes...
  10. Replies
    16
    Views
    5,558

    Re: Return from incrementing for loop?

    I'm not really sure he hasn't gone over returns yet... he just assigned a homework assignment with it in it. I read a little on returns but still couldn't get it. It worked in the second method...
  11. Replies
    16
    Views
    5,558

    Re: Return from incrementing for loop?

    I'm very new to programming and my teacher is very vague he just makes slide shows and they are all very unorganized this has been a problem with his classes for years from what i hear. So honestly i...
  12. Replies
    16
    Views
    5,558

    Re: Return from incrementing for loop?

    this is what i get for errors
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    This method must return a result of type int

    at...
  13. Replies
    16
    Views
    5,558

    Re: Return from incrementing for loop?

    Yes thank you i know i need to change the method to int so i can return an Integer. i reposted the whole code in the "whats wrong with my code" forum the value of sum from what i linked when i use it...
  14. Replies
    16
    Views
    5,558

    Return from incrementing for loop HELP?!

    public class IntSumReturnValues {

    public static void main(String[] args) {
    int n = 100;
    // int sumLoop=
    System.out.println("The sum of the numbers from 1 to "
    + n + " is...
  15. Replies
    16
    Views
    5,558

    Return from incrementing for loop?

    I'm trying to return a variable form a for loop that is incrementing
    here is my for loop i need to return the sum value (i know i need to change void from the method name)

    public static void...
Results 1 to 15 of 15