Input should be given by user
Input should be given by user
Det means determinant and we have to give values at run time
I'm still not sure what you mean by "determinant in an array". Do you store a square matrix in an array and want to get the determinant of that?
You can use the "Read-Host" cmdlet to solicit input from the user.
I'm not sure what you mean by "det" though.
Maybe this is what you're looking for?
$values = 1,2,3,4,5
$x = Read-Host "Give me a number: "
if ($values -contains $x){
Write-Host "Found it!" -ForegroundColor Green
}
else{
Write-Host "Didn't find $x" -ForegroundColor Yellow
}
This may be what you're looking for:
it (unfortunately) uses recursion, so you may run into difficulties with very large matrices. There are other ways of computing the determinant that don't use recursion if you're willing to code them yourself.
13 people are following this question.