# CategoryChapter 03 – Principles and Practice Using C++

## pennie and dollar counter

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 11 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 11 #include "std_lib_facilities.h" int main() { int oneCentCoins = 0; int fiveCentCoins…

## operator and two values

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 10 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 10 #include "std_lib_facilities.h" int main() { string operation; double val1 = 0;…

## spelled out number to integer

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 9 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 9 #include "std_lib_facilities.h" int main() { cout << "enter a spelled out…

## odd or even number testing

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 8 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 8 #include "std_lib_facilities.h" int main() { cout << "enter an integer to…

## sorting strings

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 7 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 7 #include "std_lib_facilities.h" int main() { string word1 = " ", word2…

## sorting integers

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 6 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 6 #include "std_lib_facilities.h" int main() { int val1, val2, val3; int smallest…

## double operations

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 5 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 5 #include "std_lib_facilities.h" int main() { double val1, val2; cout << "enter…

## integer operations

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 4 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 4 #include "std_lib_facilities.h" int main() { int val1, val2; cout << "enter…

## mile to kilometer converter

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Exercise 2 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Exercise 2 #include "std_lib_facilities.h" int main() { int mile; cout << "enter miles\n";…

## unsafe conversion

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 3 Try This Page 81 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 3 Try This Page 81 #include "std_lib_facilities.h" int main() { cout <<…