三角形变换
#include <stdio.h>#include <stdlib.h>
int main(int argc, char *argv[])
{
int n,T;
n=1;
scanf("%d",&T);
while(n<=T){
int r,h,k,a;
a=1;
int x1,x2,x3,y1,y2,y3;
scanf("%d%d%d\n",&r,&h,&k);
scanf("%d%d\n%d%d\n%d%d\n",&x1,&y1,&x2,&y2,&x3,&y3);
if(r/90==0){
x1=-y1;y1=x1;
x2=-y2;y2=x2;
x3=-y3;y3=x3;}
if(r/180==0){
x1=-x1;y1=-y1;
x2=-x2;y2=-y2;
x3=-x3;y3=-y3;}
if(r/270==0){
x1=y1;y1=-x1;
x2=y2;y2=-x2;
x3=y3;y3=-x3;}
if(r/360==0){
x1=x1;y1=y1;
x2=x2;y2=y2;
x3=x3;y3=y3;}
x1+=h;y1+=k;
x2+=h;y2+=k;
x3+=h;y3+=k;
printf("Case %d",a);
printf("%.2f%.2f\n%.2f%.2f\n%.2f%.2f\n",x1,y1,x2,y2,x3,y3);
a++;
n++;
}
system("PAUSE");
return 0;
}
编译过了,就是没有输出,求助