In my code whats the error?

#include
using namespace std;
int main()
{int a[10][10];
// cout<<“Enter the no of rows:”;
int r;
cin>>r;
cout<<endl;
// cout<<“Enter the no of columns:”;
int c;
cin>>c;
cout<<endl;
////Taking all the inputs from the user
if(r<=10 &&c<=10)
{

for(int i=0;i<c;i++)
{
for(int k=0;k<r;k++)
{
cin>>a[i][k];
}
}

////Printing the output in the form of a wave
for(int k=0;k<c;k++)
{
if(k%2==0)
{

for(int i=0;i<r;i++)
{
	cout<<a[i][k]<<", ";
}
}
else
{
	
for(int i=r-1;i>=0;i--)
{
	cout<<a[i][k]<<", ";
}

}

}
cout<<“END”;
}}

Hello @manseerat,

The way you have shared your code has introduced many syntax errors to it.
Always share it using Online Coding Blocks IDE.
STEPS:

  1. Paste your code at https://ide.codingblocks.com
  2. Save it there.
  3. Share the URL generated.

I have corrected your code:


Refer to the comments for better understanding.

Hope, this would help.
Give a like if you are satisfied.

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.