-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.cpp
More file actions
90 lines (75 loc) · 1.24 KB
/
function.cpp
File metadata and controls
90 lines (75 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// #include<bits/stdc++.h>
// using namespace std;
// void fib(int n);
// int main()
// {
// int a;
// cin>>a;
// fib(a);
// return 0;
// }
// void fib(int n)
// {
// int t1=0,t2=1;
// int next;
// for(int i=1;i<=n;i++)
// {
// cout<<t1<<" ";
// next=t1+t2;
// t1=t2;
// t2=next;
// }
// }
// #include<bits/stdc++.h>
// using namespace std;
// int fact(int n);
// int main()
// {
// int a,b,c;
// int fin,x,y,z;
// cin>>a>>b;
// c=(a-b);
// x=fact(a);
// y=fact(b);
// z=fact(c);
// fin=x/(y*z);
// cout<<fin<<" ";
// return 0;
// }
// int fact(int n)
// {
// int fac=1;
// for(int i=1;i<=n;i++)
// {
// fac=fac*i;
// }
// return fac;
// }
// #include<bits/stdc++.h>
// using namespace std;
// int fact(int n);
// int main()
// {
// int a,b,n;
// int fin;
// cin>>n;
// for(int i=0;i<n;i++)
// {
// for(int j=0;j<=i;j++)
// {
// fin=fact(i)/(fact(j)*fact(i-j));
// cout<<fin<<" ";
// }
// cout<<endl;
// }
// return 0;
// }
// int fact(int n)
// {
// int fac=1;
// for(int i=1;i<=n;i++)
// {
// fac=fac*i;
// }
// return fac;
// }