#include <stdio.h>

int main()    
{    
    int n1=0,n2=1,n3,i,number;    
    printf("Enter the number of elements:\n");    
    scanf("%d",&number);    
    printf("\n%d %d",n1,n2);   
    for(i=2;i<number;++i)  
    {    
        n3=n1+n2;    
        printf(" %d",n3);    
        n1=n2;    
        n2=n3;    
     }  
    return 0;  
 }    

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: