Original Post
Hey there. I am programming fibonacci's number program in the c programming language. Here is what I have so far. /* Jonathan Schechter Fibbanaci Numbers*/ #include int main(void) { // Fibbonacci's Number = fibbNUM int getNUM int fibbNUM; printf("Enter the Fibonacci number to calculate.\n"); printf("The number must be between 2 and 46. Enter 1 to quit:%i",getNUM\n); scanf("%i",&getNUM); //Check to see if user wants to quit program if (getNUM == 1) { exit(o); } //Check to see if user entered a new number to run through fibb sequence else if ((getNUM >= 2) && (getNUM <= 46)) { //Since the user chose not to exit, the users input(getNUM) is now set to fibbNUM so that calculations can begin fibbNUM = getNUM; while (fibbNUM >=2 && fibbNUM<=46) { fibbNUM++ } } //If user enters a number other than 1 or 2-46 tell them to enter new number else { printf("Enter the Fibonacci number to calculate.\n"); printf("The number must be between 2 and 46. Enter 1 to quit:%i",quit\n); } printf(" Fibonacci Fibonacci\n"); printf(" N number quotient\n"); printf("-------------------------------------\n"); //Fibbonacci's Number Equation return 0; } the goal is to ask user to input a number between 2to46 and then print along with fibonacci's quotient. i am kind of lost with this and i want to know hot i can call the value calculated by fibb formula into the correct place on the table. Okay any help would be great!
