Wave print.I am unable to resolve the error

#include

using namespace std;

void input(int arr[100][100] , int r, int c)
{
for(int i=0;i<r;i++)
{
for(int j=0;j<c;j++)
{
cin>>arr[i][j];
}
}
}
void waveprint(int arr[100][100],int r,int c)
{
int i=0;
int j=0;
while(j<c)
{
if(j%2==0)
{
i=0;
while(i<r){
cout<<arr[i][j]<<" “;
i++;
}
}
else
{
i=r-1;
while(i>-1)
{
cout<<arr[i][j]<<” ";
i–;
}
}
j++;
}

int main(){

int arr[100][100];
int r ,c;
cin>>r>>c;
input(arr,r,c);
waveprint(arr,r,c);
return 0;
}

Modified Code

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.