Answers for "Uri/Beecrowd problem no - 1151 solution in C"

C
0

Uri/Beecrowd problem no - 1151 solution in C

#include<stdio.h>
int main(){
    int N,i,n[100];
    scanf("%d", &N);
    
    n[0] = 0;
    n[1] = 1;
    
    for(i = 2; i < N; i++){
        n[i] = n[i-1] + n[i-2];
    }
    printf("0");
    for(i = 1; i < N; i++){
        printf(" %d", n[i]);
    }
    printf("n");
    return 0;
}
Posted by: Guest on January-22-2022

Code answers related to "Uri/Beecrowd problem no - 1151 solution in C"

Code answers related to "C"

Browse Popular Code Answers by Language