Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Write a program in C language, input the values of three integer variables of abc, and output the maximum max and minimum min.
Write a program in C language, input the values of three integer variables of abc, and output the maximum max and minimum min.
This method (algorithm) is not the best, but it is easy to understand.

# include & ltstdio.h & gt

int main()

{

int a,b,c;

Scanf("%d%d%d ",& i, & ampb & amp;; c);

If (a>b & amp& ampa & gtc)

Printf ("Maximum value is %d\n", a);

If (b>a & amp& ampb & gtc)

Printf ("maximum value is %d\n", b);

if(c & gt; B & amp& ampc & gt Answer

Printf ("maximum value is %d\n", c);

If (a<b & amp& ampa & ltc)

Printf ("the minimum value is %d\n", a);

if(b & lt; a & amp& ampb & ltc)

Printf ("the minimum value is %d\n", b);

if(c & lt; b & amp& ampc & ltb)

Printf ("the minimum value is %d\n", c);

Returns 0;

}