Data update

This commit is contained in:
Ingy döt Net 2023-12-16 21:33:55 -08:00
parent 35bcdeebf8
commit 74c69a0df6
2427 changed files with 31826 additions and 3468 deletions

View file

@ -0,0 +1,26 @@
#include <iostream>
#include <climits>
#include <cfloat>
int main() {
std::cout << "The ranges of C++'s primitive data types are:" << std::endl << std::endl;
std::cout << "a char ranges from : " << CHAR_MIN << " to " << CHAR_MAX << std::endl;
std::cout << "a short char ranges from : " << SCHAR_MIN << " to " << SCHAR_MAX << std::endl;
std::cout << "an unsigned char ranges from : " << 0 << " to " << UCHAR_MAX << std::endl << std::endl;
std::cout << "a short int ranges from : " << SHRT_MIN << " to " << SHRT_MAX << std::endl;
std::cout << "an unsigned short int ranges from : " << 0 << " to " << USHRT_MAX << std::endl << std::endl;
std::cout << "an int ranges from : " << INT_MIN << " to " << INT_MAX << std::endl;
std::cout << "an unsigned int ranges from : " << 0 << " to " << UINT_MAX << std::endl << std::endl;
std::cout << "a long int ranges from : " << LONG_MIN << " to " << LONG_MAX << std::endl;
std::cout << "an unsigned long int ranges from : " << 0 << " to " << ULONG_MAX << std::endl;
std::cout << "a long long int ranges from : " << LLONG_MIN << " to " << LLONG_MAX << std::endl;
std::cout << "an unsigned long long int ranges from : " << 0 << " to " << ULLONG_MAX <<std::endl << std::endl;
std::cout << "a float ranges from : " << -FLT_MAX << " to " << +FLT_MAX << std::endl << std::endl;
std::cout << "a double ranges from : " << -DBL_MAX << " to " << +DBL_MAX << std::endl;
}

View file

@ -0,0 +1,14 @@
public final class VariableSizeSet {
public static void main(String[] args) {
System.out.println("The ranges of Java's primitive data types are:");
System.out.println();
System.out.println("A Byte variable has a range of " + Byte.MIN_VALUE + " to " + Byte.MAX_VALUE);
System.out.println("A Short variable has a range of " + Short.MIN_VALUE + " to " + Short.MAX_VALUE);
System.out.println("An Int variable has a range of " + Integer.MIN_VALUE + " to " + Integer.MAX_VALUE);
System.out.println("A Long variable has a range of " + Long.MIN_VALUE +" to " + Long.MAX_VALUE);
System.out.println("A Float variable has a range of " + Float.MIN_VALUE + " to " + Float.MAX_VALUE);
System.out.println("A Double variable has a range of " + Double.MIN_VALUE + " to " + Double.MAX_VALUE);
}
}