Skip to content

Commit

Permalink
1761 C
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPLopes committed Dec 31, 2019
1 parent b392020 commit 35ce906
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions C/1761.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>
#include <math.h>

#define PI 3.141592654

typedef struct
{
double a, b, c;
} TAD;
double heightThedolite(TAD *tad)
{
return tan(PI * tad->a / 180) * tad->b + tad->c;
}
int main(int argc, char const *argv[])
{
TAD tad = {0.0, 0.0, 0.0};

while (scanf("%lf %lf %lf", &tad.a, &tad.b, &tad.c) != EOF)
{
printf("%.2lf\n", 5 * heightThedolite(&tad));
}

return 0;
}

0 comments on commit 35ce906

Please sign in to comment.