Test Case 4 is not passed

This is the code below but test case: 4 is not passed:
#include
using namespace std;
void pythagoras(long long n)
{
long long a,b,c;
if(n==1 || n==2)
cout<<"-1";
else
{
if(n%2!=0)
{
long long p=((n+1)/2);
long long q=((n-1)/2);
a= (p+q)(p-q);
b= 2
pq;
c= ((p
p) + (qq));
if((c
c)==(aa)+(bb))
{
cout<<b<<" “<<c;
}
else
{
cout<<-1;
}
}
else
{
long long p=n/2;
long long q=1;
a= (p+q)(p-q);
b= 2
pq;
c= ((p
p) + (qq));
if((c
c)==(aa)+(bb))
{
cout<<b<<” "<<c;
}
else
{
cout<<-1;
}
}
}
}
int main()
{
long long n;
cin>>n;
pythagoras(n);
return 0;
}

Hello @prkfoxxx,

Please, from the next time share your code using Online Coding Blocks IDE:https://ide.codingblocks.com/
The way you have send this is introducing many syntax errors.
Steps:

  1. Paste it there.
  2. Save your code.
  3. Share the URL generated.

Now, focusing on code,
you are printing the wrong side in the case when n is even.

I have modified your code:

Hope, this would help.
Give a like, if you are satisfied.