Desc :
Source Code :
#include <iostream>
using namespace std;
int main()
{
cout << "round(1.1) : " << round(1.1) << endl;
cout << "round(40.5) : " << round(40.5) << endl;
cout << "round(-27.3) : " << round(-27.3) << endl;
cout << "round(-55.7) : " << round(-55.7) << endl;
}
Result :
'C++' 카테고리의 다른 글
[C++] 043 실수 소수점 버리기 floor, ceil (0) | 2021.03.22 |
---|---|
[C++] 042 피라미드 (for) (0) | 2021.03.22 |
[C++] 041 피보나치 수열 (for) (0) | 2021.03.22 |
[C++] 040 구구단 출력하기 (for) (0) | 2021.03.18 |
[C++]039 조건 순환문 do ~ while ~ continue ~ break (0) | 2021.03.18 |