#include #include using namespace std; int main(int argc, char **argv) { int const a = 326; int const b = -1; int const c = 2015; long const i1 = 65000; long const i2 = -2; long const i3 = 3261963; double const f1 = 3.1415926; double const f2 = 2.99792458e9; double const f3 = 1.234e-4; int const c1 = int('A'); int const c2 = int('B'); int const c3 = int('C'); string const s1 = "Apples"; string const s2 = "and"; string const s3 = "Bananas"; bool const b1 = true; bool const b2 = false; printf("Decimals: %d %d %d\n", a, b, c); printf("Unsigned Decimals: %u %u %u\n", a, b, c); printf("Hexadecimals: %#x %#x %#x\n", a, b, c); printf("Long Decimals: %ld %ld %ld\n", i1, i2, i3); printf("Long Hexadecimals: %016lx %016lx %016lx\n", i1, i2, i3); printf("Fixed FP: %f %f %f\n", f1, f2, f3); printf("Exponential FP: %e %e %e\n", f1, f2, f3); printf("General FP: %g %g %g\n", f1, f2, f3); printf("General FP with precision: %.2g %.2g %.2g\n", f1, f2, f3); printf("Boolean: %d %d\n", b1, b2); printf("Character: %c %c %c\n", c1, c2, c3); printf("String: %s %s %s\n", s1.c_str(), s2.c_str(), s3.c_str()); return 0; }