#include int main() { int a,b,i,temp; int num=0; while(num <= 0) { printf("Enter the number of elements you want to generate: "); scanf("%d",&num); if(num <= 0) printf("Invalid Input, enter a positive integer.\n"); } a=0; b=1; printf("%d",a); for(i=2;i<=num;i++) { printf(" %d",b); temp = a + b; a = b; b = temp; } printf("\n"); }