HD = 4
D = 3
C = 2
P = 1
N = 0
GPA = x/n
where n is the number of variables
x = a + b + c + d
where
a is variable 1 which can equal a number between 4(HD) and 0(N)
b is variable 2 which can equal a number between 4(HD) and 0(N)
c is variable 3 which can equal a number between 4(HD) and 0(N)
d is variable 4 which can equal a number between 4(HD) and 0(N)
With that in mind, how would I work out the possible combinations of variables that could = x?
Example: 1. Input = 3.75, output = (HD, HD, HD, D) 2. Input = 2.00, output = (HD, N, HD, N), (C, C, C, C), etc
By the way, this isn't for an assignment or anything - I just saw a lot of people asking what their grades could be after my university released student's GPA before grades and I've been brain storming how to work out the permutations. I'm an arts student with an interest in maths and programming so go easy.