#include
#define FILE_NAME "text.txt"
#define max(a, b) ((a > b) ? a : b)
static void write_to_file(const char *file_name,
int a, int b, int c)
{
FILE *file;
int max_n = max(a, max(b, c));
if (!(file = fopen(file_name, "w"))) {
perror("fopen error");
return;
}
fprintf(file, "%d %d %d\n", a, b, c);
fprintf(file, "max: %d\n", max_n);
fclose(file);
}
int main(void)
{
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
write_to_file(FILE_NAME, a, b, c);
return 0;
}
// input: 12 65 25
// output(file.txt):
// 12 65 25
// max: 65