15 lines
357 B
C
15 lines
357 B
C
#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");
|
|
}
|
|
} |