Table of contents
코드
#include "windows.h"
#include "stdio.h"
double GetMax(double, double);
int GetMax(int, int);
void main()
{
int i;
double d;
i = GetMax(123,456);
d = GetMax(1.23, 4.56);
printf("\n%d",i);
printf("\n%f",d);
}
double GetMax(double a, double b)
{
if(a>b)
{
return a;
}
else
{
return b;
}
};
int GetMax(int a ,int b)
{
if(a>b)
{
return a;
}
else
{
return b;
}
};
'소프트웨어 > C++' 카테고리의 다른 글
C++ lower_bound, upper_bound 활용하기 (0) | 2022.02.13 |
---|---|
C++ 주요 STL(Standard Template Library) 내용 정리 (0) | 2022.02.13 |
C++ tuple로 이루어진 vector 요소 추가, 정렬, 출력 (0) | 2022.02.13 |
C++ 1, 2차원 vector 선언 및 함수로 인자 전달 후 출력 (0) | 2022.02.13 |
C++ map 라이브러리 코드 예제 (0) | 2022.02.13 |