#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
const double pi = 3.1415926;
int x = -1, y = -2; // 移動量
for ( int i = 0; i != 4; ++i ) {
double a = pi / 2 * i; // 回転角(ラジアン)
double mx = x * cos( a ) - y * sin( a ); // 回転後移動量
double my = x * sin( a ) + y * cos( a );
cout << setw( 3 ) << i * 90 << "度回転時移動量:"
<< "( " << setw( 2 ) << mx << ", " << setw( 2 ) << my << " )" << endl;
}
return 0;
}