4 Respostas
+ 7
Your Second code some errors i noticed First one in line 4 you defined function void permutation(char *s,int i,int n) here what u did . Here you gave definition but. You forget to put bracket after function name u should write like this void permutation(char *s,int i,int n) { body you missed bracket } Second one in line 27 when u taking String input u used scanf here you used & address remove it its not required when u taking String input u can simply write scanf("%s",str); Your swap is showing undefined becoz so define it globally in header after headerfile. Fix them your code will work And you used forward slash in instead of backslash write \n not /n and try to figure errors.
3rd Oct 2020, 5:41 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 7
You Fibonacci series code is woRkiNg but u did mistake in line 6 in second expression u forget to call function it should be fibo(n-2) u missed to call fibo so u were not getting proper series. #include<stdio.h> int fib(int n){ if(n==0||n==1) return n; return (fib(n-1)+fib(n-2)); } int main() { int i; for(i=0;i<=10;i++) printf("\n Fibonacci series %d",fib(i)); return 0; }
3rd Oct 2020, 10:35 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 5
Thnx
3rd Oct 2020, 5:45 AM
Aarti Rani
Aarti Rani - avatar
+ 4
Aarti Rani welcome 😜
3rd Oct 2020, 5:48 AM
A S Raghuvanshi
A S Raghuvanshi - avatar