Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Sudan-function/R/sudan-function.r
Normal file
18
Task/Sudan-function/R/sudan-function.r
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#Aamrun, 11th July 2022
|
||||
|
||||
F <- function(n, x, y) {
|
||||
if(n==0){
|
||||
F <- x+y
|
||||
return (F)
|
||||
}
|
||||
|
||||
else if(y == 0) {
|
||||
F <- x
|
||||
return (F)
|
||||
}
|
||||
|
||||
F <- F(n - 1, F(n, x, y - 1), F(n, x, y - 1) + y)
|
||||
return (F)
|
||||
}
|
||||
|
||||
print(paste("F(1,3,3) = " , F(1,3,3)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue