Accepted solution

URI 1012 solution

Open original problem
Source code

#include <stdio.h>

int main()

{

    double A,B,C;

   double TRIANGULO,CIRCULO,TRAPEZIO,QUADRADO,RETANGULO;

  scanf("%lf %lf %lf",&A,&B,&C);

  TRIANGULO=.5*A*C;

  CIRCULO= 3.14159*C*C;

  TRAPEZIO=.5*(A+B)*C;

  QUADRADO=B*B;

  RETANGULO=A*B;

  printf("TRIANGULO: %.3lf
",TRIANGULO);

  printf("CIRCULO: %.3lf
",CIRCULO);

  printf("TRAPEZIO: %.3lf
",TRAPEZIO);

  printf("QUADRADO: %.3lf
",QUADRADO);

  printf("RETANGULO: %.3lf
",RETANGULO);

    return 0;

}
Join the discussion

Add your comment