#include<iostream>
using namespace std;
struct Tu
{
char shape;
double x0, y0, r;
double x1, y1, x2, y2;
}tu[500];
int main()
{
char v;
int n = 0, s = 0;
while (cin >> v)
{
if (v == '*')
break;
if (v == 'c')
{
cin >> tu[n].x0 >> tu[n].y0 >> tu[n].r;
tu[n++].shape = v;
continue;
}
if (v == 'r')
{
cin >> tu[n].x1 >> tu[n].y1 >> tu[n].x2 >> tu[n].y2;
tu[n++].shape= v;
}
}
for (int i = 0; i < n; i++)
{
if (tu[i].shape== 'r')
cout << tu[i].shape <<" "<< tu[n].x1<<" " << tu[n].y1<<" " << tu[n].x2<<" " << tu[n].y2 << endl;
if (tu[i].shape == 'c')
cout << tu[i].shape<<" " << tu[n].x0 <<" "<< tu[n].y0<<" " <<tu[n].r<<endl;
}
return 0;
}
onemoo
相关分类