#include <iostream>
#include <cstdio>
#include <cmath>
usingnamespace std;
int main()
{
double x,y,z;
int N;
float Area,s;
cin >> N;
if (N > 1000)
return 0;
for (int i = 1; i <= N;i++)
{
cin >> x;
if ( x > 5000)
return 0;
cin >> y;
if ( y > 5000)
return 0;
cin >> z;
if ( z > 5000)
return 0;
s = ( x + y + z ) / 2;
Area = sqrt ( s * ( s - x ) * ( s - y ) * ( s - z ));
int B = Area;
if ( (B % 3) == 0 && ( x != y != z))
{
cout << x << " " << y << " " << z ;
printf (" : RIGHT TRIANGLE WITH AREA %1.5f UNITS SQUARED\n",Area);
}
if ( Area == 0)
{
cout << x << " " << y << " " << z ;
cout << " : NOT A TRIANGLE" << endl;
}
elseif ( (B % 3) > 0)
{
cout << x << " " << y << " " << z ;
printf (" : TRIANGLE WITH AREA %1.5f UNITS SQUARED\n",Area);
}
}
return 0;
}
Ok, Just keep one thread going, otherwise you will have new threads all over the place. The problem is that someone might write lots of stuff into one thread, only to discover someone else has written heaps into the other one. As well as this, you threads are on different boards.
Apart from that you haven't said what the particular problem is now.
I don't think it will compile, so post your compiler output.