Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Combination {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- int x1 = 0;
- int x2 = 0;
- int x3 = 0;
- int x4 = 0;
- int x5 = 0;
- int count = 0;
- for (int i = 1; i < x1; i++) {
- for (int j = 1; j < x2; j++) {
- for (int k = 1; k < x3; k++) {
- for (int l = 1; l < x4; l++) {
- for (int m = 1; m < x5; m++) {
- }
- if (x1+x2+x3+x4+x5==n){
- count++;
- System.out.println(count);
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement