C/C++の宿題片付けます 170代目 [無断転載禁止]©2ch.net (86レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

62: 2020/12/21(月)14:41 ID:phRwvUi8(1) AAS
#include <stdio.h>
#include <math.h>
#include <complex.h>
int main() {
double px, py, r, qx, qy;
scanf("%lf %lf %lf %lf %lf", &px, &py, &r, &qx, &qy);
double complex p = px + py * I;
double complex q = qx + qy * I;
double complex v = q - p;
double l = cabs(v);
double s = carg(v);
double t1 = s + acos(r / l);
double t2 = s - acos(r / l);
double complex c1 = p + r * cexp(t1 * I);
double complex c2 = p + r * cexp(t2 * I);
printf("(%f, %f)\n", creal(c1), cimag(c1));
printf("(%f, %f)\n", creal(c2), cimag(c2));
}
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.007s