Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Problem with int and formula

$
0
0
hello
I am new to coding....
I am creating a app to play craps..roll the dice
I am having trouble generating the integer range and when I get to the formula it states "the bad operand types for binary operator '+''

int [] dice1={1,2,3,4,5,6};
int[] dice2={1,2,3,4,5,6};

int Roll1(){
int Value=(dice1)+(dice2); //this is where the error is
return Value;
}
it suppose to be random rolls with the options between 1 and 6
I know that I have to use the new java.util.Random() I have not done that yet..

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>