June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -0,0 +1,14 @@
|
|||
function pascal(a::Integer, b::Integer, mid::Integer, top::Integer)
|
||||
yd = round((top - 4 * (a + b)) / 7)
|
||||
!isinteger(yd) && return 0, 0, 0
|
||||
y = Int(yd)
|
||||
x = mid - 2a - y
|
||||
return x, y, y - x
|
||||
end
|
||||
|
||||
x, y, z = pascal(11, 4, 40, 151)
|
||||
if !iszero(x)
|
||||
println("Solution: x = $x, y = $y, z = $z.")
|
||||
else
|
||||
println("There is no solution.")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue