Class assignment

#include
using namespace std;
int fib(int x) {
if((x==1)||(x==0)) {
return(x);
}else {
return(fib(x-1)+fib(x-2));
}
}
int main() {
int x , i=0;
cin >> x;
while(i < x) {
cout << “*” << fib(i);
i++;
}
return 0;
}
i am getting error please correct my code

hello @karthik1989photos i have corrected your code .


please try to understand the corrections i have made .
i hope i have cleared your doubt .
Happy Learning !!

hello @karthik1989photos as you are not responding i think i have cleared your doubt so you can now mark this doubt as resolved .on off the chance if you still have doubt you cam reopen the doubt and ask again .
Happy Learning !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.