C++ abs()

1 개요[ | ]

C++ abs()
#include <iostream>
using namespace std;
int main() {
	int a = -5;
	long b = -2371041;
	float c = -3.14;
	double d = -6.123456;
	cout << abs(a) << endl;
	cout << abs(b) << endl;
	cout << abs(c) << endl;
	cout << abs(d) << endl;
	// 5
	// 2371041
	// 3.14
	// 6.12346
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}