Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //261
- #include <cstdio>
- #include <cmath>
- int main(void) {
- FILE* fin = fopen("input.txt", "r");
- FILE* fout = fopen("output.txt", "w");
- double a, b, f1, f2, f3;
- fscanf(fin, "%lf%lf", &a, &b);
- fclose(fin);
- f1 = (a + b) / 2;
- f2 = sqrt(a * b);
- f3 = sqrt(f1 * f2);
- fprintf(fout, "%.2f\n", f3);
- fclose(fout);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement