Java
Programming and Technical
Programming
Arrays
21. you have three dice each side is numbered as 1,2,3,4,5,6 .you have to take a
number from user check that number as sum of any side number of these
three dice.like we take number as 5 then the possibility are (1,1,3) (1,2,2)
(1,3,1) (2,1,2) (2,2,1) (3,1,1) and is 6 possibility. So write to a program for that.
Read Solution (Total 1)
-
- import java.util.Scanner;
public class general {
public static int prob(int num){
int[] a= {1,2,3,4,5,6};
int[] b= {1,2,3,4,5,6};
int[] c= {1,2,3,4,5,6};
int count=0;
for(int i=0; i - 5 years agoHelpfull: Yes(0) No(1)
Java Other Question