This repository has been archived on 2023-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
mipt_cpp/seminar01_overload/classroom_tasks/code/02function_overload/04std.cpp
2022-09-01 16:37:41 +03:00

17 lines
No EOL
447 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <iostream>
#include <cmath>
using std::cout, std::endl;
/*
В отличии от языка C в языке C++ стандартные математические функции уже перегружены и могут
работать с разными типами данных
*/
int main()
{
cout << std::abs(-4) << endl;
cout << std::abs(-4.2) << endl;
cout << std::abs(-4.2f) << endl;
}