# CategoryChapter 11 – Principles and Practice Using C++

## transforming decimal integer to hexadecimal, to octal and back to decimal

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Drill 8 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Drill 8 #include "std_lib_facilities.h" void set_age(int& _a, int& _ao, int& _ah, int& _ah1)…

## decimal, hexadecimal and octal output 1.4 [age]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Drill 5 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Drill 5 #include "std_lib_facilities.h" int age = 28; int main() try { int…

## decimal, hexadecimal and octal output 1.3 [set width]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Drill 4 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Drill 4 #include "std_lib_facilities.h" int birth_year = 1988; int main() try { int…

## decimal, hexadecimal and octal output 1.2 [integer birth year]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Drill 3 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Drill 3 #include "std_lib_facilities.h" int birth_year = 1988; int main() try { cout…

## decimal, hexadecimal and octal output 1.1 [integer birth year]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Drill 2 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Drill 2 #include "std_lib_facilities.h" int birth_year = 1988; int main() try { cout…

## decimal, hexadecimal and octal output 1.0 [integer birth year]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Drill 1 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Drill 1 #include "std_lib_facilities.h" int birth_year = 1988; int main() try { keep_window_open();…

## set width of output field

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Try This page 388 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Try This page 388 #include "std_lib_facilities.h" int main() try { int…

## default, fixed and scientific float output

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Try This page 386 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Try This page 386 #include "std_lib_facilities.h" double a = 1234567.89; int…

## decimal, hexadecimal and octal output [integers]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Try This page 384 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Try This page 384 #include "std_lib_facilities.h" int a, b, c, d;…

## decimal, hexadecimal and octal output

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 11 Try This page 382 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 11 Try This page 382 #include "std_lib_facilities.h" int main() try { int…