U E D R , A S I H C RSS

이태균/LittleAOI/중위수구하기

소 감



코 드

package main

import "fmt"

func main(){
	var a,b,c int
	var temp int

	fmt.Scanf("%d %d %d",&a,&b,&c)

	if a ==-999 {
		fmt.Println("End")
		return
	}
	fmt.Printf("A = %d B = %d C = %d\n",a,b,c)

	if a >= b{
		temp = b
		b = a
		a = temp
	}
	if b >= c {
		temp = c
		c = b
		b = temp

	}
	if a >= c {
		temp = a
		a = c
		c = temp
	}

	fmt.Printf("middlenum = %d",b)
}


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:34
Processing time 0.0193 sec