FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cprogram/Fibonacci series at master · Azbar-coder/cprogram · GitHub
Azbar-coder
cprogram
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cprogram
/
Fibonacci series
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (14 loc) · 321 Bytes
Breadcrumbs
cprogram
/
Fibonacci series
Copy path
File metadata and controls
16 lines (14 loc) · 321 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
int main() {
int i, n, t1 = 0, t2 = 1, nextTerm;
printf("Enter the number of terms: ");
scanf("%d", &n);
printf("Fibonacci Series: ");
for (i = 1; i <= n; ++i) {
printf("%d, ", t1);
nextTerm = t1 + t2;
t1 = t2;
t2 = nextTerm;
}
return 0;
}
Back
|
FazBrowse Home
|
New Git URL