fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. float k, c, S;
  6. int a, b;
  7. scanf("%f%d%d", &k, &a, &b);
  8. c = k * ((float)a / b);
  9. S = pow(a, 2) + b / k;
  10. printf("c = %.1f. S = %.1f.", c, S);
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5284KB
stdin
5.4
6
8
stdout
c = 4.1. S = 37.5.