By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Statement missing ; error in C++

P: 1
I am using turbo C++
WHILE MAKING A PROGRAM TO TRANSPOSE OF A MATRIX I GOT THE ERROR STATEMENT MISSING;
INLINE 15 WHICH IS THE FOR STATEMNT
Expand|Select|Wrap|Line Numbers
  1. cout<<"\n The matrix is"
  2.  for(i=0; i<m; ++i) //****** error in this line
HERE IS THE PROGRAM

Expand|Select|Wrap|Line Numbers
  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5.  clrscr();
  6.  int i, j, m, n, A[5][5], B[5][5];
  7.  cout<<"Enter the rows and coloums";
  8.  cin>>m>>n;
  9.  cout<<"Enter the "<<m*n<<" numbers";
  10.  for(i=0; i<m; ++i)
  11.  for(j=0; j<n; ++j)
  12.  cin>>A[i][j];
  13.  cout<<"\n The matrix is"
  14.  for(i=0; i<m; ++i)
  15.  {
  16.   cout<<"\n";
  17.   for(j=0; j<n; ++j)
  18.   cout<< A[i][j]<<" " ;
  19.  
  20.  }
  21.  getch();
  22. }
Dec 26 '16 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
Expand|Select|Wrap|Line Numbers
  1. cout<<"\n The matrix is"   << No semi-colon here.<<-----!!
  2.  for(i=0; i<m; ++i)
  3.  {
  4.  
Dec 27 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.