September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
25
Task/Multifactorial/Dart/multifactorial.dart
Normal file
25
Task/Multifactorial/Dart/multifactorial.dart
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
main()
|
||||
{
|
||||
int n=5,d=3;
|
||||
int z= fact(n,d);
|
||||
print('$n factorial of degree $d is $z');
|
||||
for(var j=1;j<=5;j++)
|
||||
{
|
||||
print('first 10 numbers of degree $j :');
|
||||
for(var i=1;i<=10;i++)
|
||||
{
|
||||
int z=fact(i,j);
|
||||
print('$z');
|
||||
}
|
||||
print('\n');
|
||||
}
|
||||
}
|
||||
|
||||
int fact(int a,int b)
|
||||
{
|
||||
|
||||
if(a<=b||a==0)
|
||||
return a;
|
||||
if(a>1)
|
||||
return a*fact((a-b),b);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue