CPP_Basics_Syntax/第一讲 变量、输入输出、表达式与顺序语句/614.cpp

14 lines
238 B
C++
Raw Permalink Normal View History

2023-03-30 16:31:31 +08:00
#include <cmath>
#include <cstdio>
int main()
{
int a, b, c;
int max;
scanf("%d%d%d", &a, &b, &c);
max = (a + b + abs(a - b)) / 2;
max = (max + c + abs(max - c)) / 2;
printf("%d eh o maior", max);
return 0;
}