# TagPrinciples and Practice Using C++

## 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 <<…

## Goodbye, cruel world!

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

## repeat word detection program

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

## operator exercise

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