C_CPP/02_MENT/limits_println.cpp

22 lines
707 B
C++
Raw Normal View History

2018-03-09 09:47:53 +01:00
#include "println.hpp"
#include <limits>
int main()
{
println("type\t sizeof\t\t lowest\t\t\t\t highest\n");
println("float \t ",sizeof(float), "\t\t\t",
std::numeric_limits<float>::lowest(), "\t\t",
std::numeric_limits<float>::max());
println("double\t ",sizeof(double), "\t\t\t",
std::numeric_limits<double>::lowest(), "\t\t",
std::numeric_limits<double>::max());
println("int \t ",sizeof(int), "\t\t\t",
std::numeric_limits<int>::lowest(), "\t\t\t",
std::numeric_limits<int>::max());
println("long \t ",sizeof(long), " \t\t",
std::numeric_limits<long>::lowest(), '\t',
std::numeric_limits<long>::max());
}