Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define n 100
- int main(){
- long int matrix[n];
- int i;
- matrix[0]=matrix[1]=1;
- for(i=2; i<n; i++){
- matrix[i]=matrix[i-1]+matrix[i-2];
- }
- int j;
- for(j=0; j<n; j++){
- printf("The %dth Fibonacci's sequense's string is equal to %ld.\n", j+1, matrix[j]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement