求解 重赏
c吧
全部回复
仅看楼主
level 1
476馃惎 楼主
求解 重赏
2017年12月02日 07点12分 1
level 11
有偿代写,qq979455800
2017年12月02日 07点12分 2
level 8
#include<stdio.h>
#include<math.h>
int main()
{float n[30],m[30];
int T,i,c[30];
float a[30],x[30],y[30],b[30];
scanf_s("%d",&T);
for(i=0;i<T;i++)
{scanf_s("%f %f",&n[i],&m[i]);
if(15000>=n[i] && n[i]>=-15000 && 15000>=m[i] && m[i]>=-15000 )
{a[i]=n[i]*n[i]-4*m[i];
if(a[i]>=0)
{
x[i]=(-n[i]-sqrt(a[i]))/-2.0;
y[i]=(-n[i]+sqrt(a[i]))/-2.0;
if(x[i]>y[i])
{ b[i]=x[i];
x[i]=y[i];
y[i]=b[i];}
c[i]=x[i];
}
}
else a[i]=-1;}
for(i=0;i<T;i++)
{if(c[i]==x[i])
printf("Case #%d:%.0f %.0f\n",i+1,x[i],y[i]);
else printf("Case #%d:It is impossible\n",i+1);}
return 0;}
2017年12月04日 11点12分 5
level 8
楼主给多少[滑稽]
基德那一题的
2017年12月04日 11点12分 6
level 5
QQ1427737505
2017年12月27日 06点12分 11
level 1
这是哪里的题啊?楼主能给个网址吗
2018年01月01日 10点01分 12
1