1 개요[ | ]
- C++ abs()
C++
Copy
#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 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.