#include <stdio.h>
int main()
{
FILE *fp1, *fp2;
float r, area;
fp1 = fopen("input.txt", "r");
fp2 = fopen("output.txt", "w");
fscanf(fp1, "%f", &r);
area = 3.14 * r * r;
fprintf(fp2, "%.2f", area);
fclose(fp1);
fclose(fp2);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: