2024-01-18 11:10:10 +01:00
|
|
|
#include <iostream> // for std::cout
|
2024-01-22 19:08:07 +01:00
|
|
|
#include <iomanip>
|
2024-01-22 10:26:02 +01:00
|
|
|
#include "io.h"
|
2024-01-22 19:08:07 +01:00
|
|
|
#include <chrono>
|
2024-01-18 11:10:10 +01:00
|
|
|
// Definition of function main()
|
|
|
|
int main()
|
|
|
|
{
|
2024-01-22 11:20:13 +01:00
|
|
|
|
2024-01-22 19:08:07 +01:00
|
|
|
// int a{read_number()};
|
|
|
|
// int b{read_number()};
|
|
|
|
// write_answer(a + b);
|
|
|
|
|
|
|
|
std::cout << std::left; // left justify output
|
|
|
|
std::cout << std::setw(16) << "bool:" << sizeof(bool) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "char:" << sizeof(char) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "short:" << sizeof(short) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "int:" << sizeof(int) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "long:" << sizeof(long) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "long long:" << sizeof(long long) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "float:" << sizeof(float) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "double:" << sizeof(double) << " bytes\n";
|
|
|
|
std::cout << std::setw(16) << "long double:" << sizeof(long double) << " bytes\n";
|
2024-01-18 11:10:10 +01:00
|
|
|
return 0;
|
|
|
|
}
|