# CategoryChapter 05 – Principles and Practice Using C++

## celsius to kelvin error handling

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Exercise 4 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Exercise 4 //input: 24 #include "std_lib_facilities.h" double ctok(double c) { double lowestTempinC =…

## celsius to kelvin 02

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Exercise 3 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Exercise 3 #include "std_lib_facilities.h" //input: 24 double ctok(double c) { double lowestTempinC =…

## celsius to kelvin 01

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Exercise 2 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Exercise 2 //input: 24 double ctok(double c) { int k = c +…

## error training

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Drill 1 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Drill 1 #include "std_lib_facilities.h" int main() try { /*1 Cout << "Success!\n"; cout…

## pre and post condition in function

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Try This page 166 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Try This page 166 #include "std_lib_facilities.h" int area(int length, int width)…

## temperature high, low and average [set range]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Try This page 156 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Try This page 156 #include "std_lib_facilities.h" /* First set of doubles…

## temperature high, low and average

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Try This page 155 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Try This page 155 #include "std_lib_facilities.h" /* First set of doubles…

## uncaught exception

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

## area function debugging

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Try This page 146 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Try This page 146 #include "std_lib_facilities.h" int area(int length, int width)…

## testing error response 02

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 5 Try This page 139 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 5 Try This page 139 #include "std_lib_facilities.h" int area(int length, int width)…