CS2263/Assigments/1/testingFib.c

15 lines
357 B
C
Raw Permalink Normal View History

2023-05-22 23:28:51 -03:00
#include <stdio.h>
int isFib(int i);
int main() {
int i;
printf("Please enter a number to check if part of fibonacci sequence: ");
scanf("%d", &i);
if(isFib(i) == 1){
printf("Your number is part of the fibonacci sequence");
}
else {
printf("Your number is not part of the fibonacci sequence");
}
}