Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/Sudan-function/C-sharp/sudan-function.cs
Normal file
26
Task/Sudan-function/C-sharp/sudan-function.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//Aamrun, 11th July 2022
|
||||
|
||||
using System;
|
||||
|
||||
namespace Sudan
|
||||
{
|
||||
class Sudan
|
||||
{
|
||||
static int F(int n,int x,int y) {
|
||||
if (n == 0) {
|
||||
return x + y;
|
||||
}
|
||||
|
||||
else if (y == 0) {
|
||||
return x;
|
||||
}
|
||||
|
||||
return F(n - 1, F(n, x, y - 1), F(n, x, y - 1) + y);
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("F(1,3,3) = " + F(1,3,3));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue