![[JAVA] 최댓값, 중앙값, 최소값](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F6sfoD%2FbtrUImgmzJ3%2FDt5EPeAFuP7KausrSyECM1%2Fimg.png)
Do it! 자료구조와 함께 배우는 알고리즘 입문[자바편] 연습문제와 실습문제입니다. 입력 변수 3개, 최댓값, 중앙값, 최솟값 최댓값 static int max(int a, int b, int c) { int max = a; if(b>max)max=b; if(c>max)max=c; return max; } 중앙값 static int mid(int a, int b, int c) { if(a > b) { if(b > c)return b; else if(a > c)return c; else return a; } else if(a>c)return a; else if(b>c)return c; else return b; } 최솟값 static int min(int a, int b, int c) { int min ..
![[Python] 내장 함수](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Ft3IVP%2FbtrTdHy926N%2FCJw5BbOnklxmMHzLQEk2f0%2Fimg.jpg)
파이썬에는 많은 내장 함수가 있다. 모든 내장 함수를 다루고 싶지만, 모든 내장 함수를 정리하는 것은 시간도 많이 필요하고 비 효율적이다. 그래서 사용 빈도가 높은 함수들만 정리하겠다. 숫자 관련 내장 함수 int() 함수 문자열 형태의 숫자나 소수점이 있는 숫자 등을 int 형태로 리턴함 int(1.23) #1 int(123) #123 int("123") #문자열도 숫자로 바꿀 수 있음 int(True) #1 0은 False, 1은 True(0 이외의 숫자는 모두 True임) float() 함수 문자열 형태의 숫자나 소수점이 없는 숫자 등을 float형태로 리턴함 float("123") #123.0 float(10) #10.0 float(True) #1.0 float(1.123) #1.123 문자열 관..