What kind of numbers did i miss?

code:
#include
using namespace std;
int main() {
float n1;
int i;
int n2=0,n3=0;
cin>>n1;
if(n1==(unsigned int)n1)
{
i=n1;
if(n1!=0)
{if(i%2==0)//even number
{
n2=(((n1n1)/4)-1);
n3=(((n1
n1)/4)+1);

	}
	else//odd number
	{
		n2=(((n1*n1)-1)/2);
		n3=(((n1*n1)+1)/2);
	}
	}
	else
	cout<<-1;


	
}


if(n2>n3 && n1==i)
cout<<n3<<" "<<n2<<endl;
else if(n3>n2 && n1==i)
cout<<n2<<" "<<n3<<endl;
else if(n1<0)
cout<<-1;
else
cout<<-1;
return 0;

}

failing 3 test cases
this code runs correctly for 0,positive integer and decimal,negative integer and decimal…

please share the ide link of your code as it will be easy to understand and explain a little bit what you are trying to do.

link:https://ide.codingblocks.com/s/203890

we have to input a number N

and find pythagorean triplets corresponding to that number

in this question, the range of n is 10^9 and when in the code you are doing n*n then it will overflow as float is only of 4 bytes, so use long long int as datatype in this question.

After doing this, just go through your once again as you have many redundant conditions, otherwise your logic is correct.

Hope it helps.
Feel free to ask if doubt still exists.