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...
Type: Posts; User: mindlessn00b
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...
anyone got any idea?
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...
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;
...
Ohhhh okay thank you very much. I didn't realize it was that simple!
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?
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
...
oh wow it was that simple!!!!! Thanks a ton Norm!!!!
public class IntSumReturnValues {
public static void main(String[] args) {
int n = 100;
// int sumLoop= ...
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...
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...
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...
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...
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...
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...
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...