My issue
include <stdio.h>
void fib_series(int n)
{
int a=0,b=1,next;
for(int i=0;i<n;i++)
printf(“%d”,a);
next = a+b;
a = b;
b= next;
}
int main() {
int V;
scanf(“%d”,&V);
fib_series(V);
printf(“\n”);
return 0;
}
find the error
My code
#include <stdio.h>
void fib_series(int n)
{
int a=0,b=1,next;
for(int i=0;i<n;i++)
printf("%d",a);
next = a+b;
a = b;
b= next;
}
int main() {
int V;
scanf("%d",&V);
fib_series(V);
printf("\n");
return 0;
}
Learning course: Roadmap to 3*
Problem Link: https://www.codechef.com/learn/course/klu-roadmap-3star/KLURMP300B/problems/LPYAS162