someone please help me with correcting this program

A number of points defined in a plane by means of their coordinates Xi and Yi, the number of points and their coordinates are input from a text file with the following structure
N
X1 , Y1
.....
Xn , Yn
Create a matrix A , whose elements Aij are the distance between point i and j. take a mental note of the symmetry of the matrix.output the matrix on the screen and check if there are points with identical coordiantes if there is such points output the indices of each two of the points that coincide.
please make notice that am a beginner and i don't know that match about c++ :)
that's the program

#include<iostream>

int main()
{
int n,x,y,j;

cout<<"Enter Number of Points";
scanf("%d",&n);
Printf("Enter the distances between Coordinates(x and y):");
scanf("%d %d ", &x , &y);
for a[x][y];
printf("The Number of Points are ",&n);

for(int i=0; i<a.length; i++)
{
for(int j=0; j<a[i].length; j++)
printf("\t ", a[i][j],"\n");
if(a[i]=a[j])
printf("identical points are : ",a[i] , "and ", a[j],"\n");
else
printf("The Matrix is ", a[i][j], "\n");
}
return 0;
}
Last edited on
Can we see example inputs and outputs?
Topic archived. No new replies allowed.