fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int r, k;
  5. float a, p;
  6. scanf("%d%d", &r, &k);
  7. a = k / 4.;
  8. p = r - 4 * a;
  9. printf("p = %.1f, при а = %.1f.", p, a);
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5292KB
stdin
8
4
stdout
p = 4.0, при а = 1.0.