Menu
Question Index
...

Write a program to print the possible combinations of marks of a student given the total marks.
Note: Assume he did not fail in any subject and did not get distinction in any subject. Assume that number of subjects is 3, maximum marks per subject is 10, fail marks is less than or equal to 3 and distinction is greater than or equal to 8.

Input (Integer) Output (Printed Output)
18 4 7 7
5 6 7
5 7 6
6 5 7
6 6 6
6 7 5
7 4 7
7 5 6
7 6 5
7 7 4
20 6 7 7
7 6 7
7 7 6
12 4 4 4
15 4 4 7
4 5 6
4 6 5
4 7 4
5 4 6
5 5 5
5 6 4
6 4 5
6 5 4
7 4 4
21 7 7 7



class PrintPossibleMarks
{
    public static void main(String s[])
    {
        System.out.println("Possible marks of the student : ");
        printPossibleMarks(18);

    }


    public static void printPossibleMarks(int totalMarks) {
    }

}

Doubts

Problems

Topic: Nested for Loop In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App