In this problem, you will be given a square which has a length of n. Co-ordinates of the square are …
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
I use the formula ,but it give error in case 3;
my code:
#include<stdio.h>
int main()
{
int t,i;
scanf(“%d”,&t);
int a[t];
for(i=0;i<t;i++)
scanf(“%d”,&a[i]);
for(i=0;i<t;i++)
{
int n;
n=a[i];