This is what i have done so far
but i want the output like that
square#1:not an increasing square
square#2: increasing square
square#3: not an increasing square

please help

Help with Code Tags
C++ Syntax (Toggle Plain Text)

#include <iostream>
#include <fstream> // Header to use input and output
#include <string> 
 
using namespace std;
 
void main()
 
{
      ifstream ifile; // declare file stream variables
      ofstream ofile;
 
    int m[20][20];
	int i , j , n;
 
 
	char fileName[100];
	cout <<" please enter the name of the data file "<< endl; // prmot the user to enter the name of the datafile
 
    cin>>fileName;   // user inputs the file
    ifile.open(fileName); // ifile stream looks for the file 
 
	ifile>>n;
	cout<<"The data for "<< n << " squares to check. " <<endl; 
	cout << "\n";
for (i=0; i<12; i++) 
      { 
for(j=0;j<4;j++){
		ifile>>m[i][j]; 
	  }
}
 
for (i=0;i<12;i++)
	{
		cout << "\n| ";
		for (j=0;j<4;j++)
		{
			cout << " | ";
			cout << m[i][j];
		}
	}
 
 
ifile.close();// c;ose file stream variables
ofile.close();

}

Here is your code, formatted. It's much easier to read. Perhaps you are mixing spaces and tabs? Don't. It will look terrible on Daniweb if you do.

#include <iostream>
#include <fstream> // Header to use input and output
#include <string> 

using namespace std;

void main()

{
	ifstream ifile; // declare file stream variables
	ofstream ofile;

	int m[20][20];
	int i , j , n;


	char fileName[100];
	cout <<" please enter the name of the data file "<< endl; // prmot the user to enter the name of the datafile

	cin>>fileName;   // user inputs the file
	ifile.open(fileName); // ifile stream looks for the file 

	ifile>>n;
	cout<<"The data for "<< n << " squares to check. " <<endl; 
	cout << "\n";
	for (i=0; i<12; i++) 
	{ 
		for(j=0;j<4;j++)
                {
			ifile>>m[i][j]; 
		}
	}

	for (i=0;i<12;i++)
	{
		cout << "\n| ";
		for (j=0;j<4;j++)
		{
			cout << " | ";
			cout << m[i][j];
		}
	}


	ifile.close();// c;ose file stream variables
	ofile.close();

}

You're going to have to elaborate on what the problem is. You have provided no output, nor have you provided an input file, so this is vague:

square#1:not an increasing square
square#2: increasing square
square#3: not an increasing square

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.