Programming 2


For instance in a GNU C++ compiler, the range of char is displayed by

#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    cout << "char ranges from  " << CHAR_MIN  <<  " to " << CHAR_MAX << endl  ;

Here CHAR_MIN and CHAR_MAX are two constants already featured in the C++ language. Similarly, you need to code a complete C++ program to show

- Minimum and maximum values for the following data types: char, short, int, float (4-byte real numbers), double (8-byte real numbers),

- Maximum values for the following data types: unsigned char, unsigned short, unsigned int, and unsigned float, unsigned double

Remember to check your compiler documentation for constants, which are compiler specific. Once you complete the program upload you *.cpp (no txt file, or no .prj) to to D2L.

    • Posted: 7 days ago
    • Due: 
    • Budget: $10