/* EXPERIMENT - */ /* AIM : TO GENERATE THE FIRST SPECIFIED 'n' TERMS OF THE FIBONACI SERIES */ /* PROGRAMMER : SHEKHAR A. SHERIKAR */ /*Date : 29:09:98*/ main() { int x,u,i,f,p,t,z; clrscr(); z=1; while(z!=0) { clrscr(); printf("\n\n\tThis program will help you to find the first 'n' terms of the\n\tFIVONACI SERIES.\n\tAll values entered should be strictly integers.\n\n\tType 1 to continue and 0 to exit : "); scanf("%d",&z); switch(z) { case 1: printf("\n\n\tEnter the upper limit for the series : "); scanf("%d",&x); u=3; i=1; f=2; if((x>1)&&(x<3)) printf("\t1\t1\t"); if(x==1) printf("\t1\t"); if(x>2) { printf("\t1\t1\t2\t"); t=0; while(u20) printf("\n\n\t\t\t!!!!!!!!!!!! ERROR !!!!!!!!!!!!\n\n\t\t!!! THE INPUT VALUE TOO LARGE FOR COMPUTATION !!!\n\n\t\t\tPress any key to Re-Run the program.....\n\n"); else printf("\n\n\tPress any key to continue........"); getch(); break; case 0: printf("\n\n\tThe program is terminated on your request.\n\n\tPress any key to return to source file........"); getch(); break; default:printf("\n\n\t\t\t!!!!!!!! INVALID INPUT !!!!!!!!\n\n\t\t\tPress any key to continue........"); getch(); break; } } }