Category Chapter 08 – Principles and Practice Using C++

print until char appears [times x]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 12.1 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 12.1 #include "std_lib_facilities.h" vector<string> alphabet{ "a","b","c","d", "e","f","g","h", "a","b","c","d", "e","f","g","h"…

print until char appears

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 12.0 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 12.0 #include "std_lib_facilities.h" vector<string> alphabet{ "a","b","c","d", "e","f","g","h", "i","j","k","l", "m","n","o","p",…

max value of vector

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 10 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 10 #include "std_lib_facilities.h" vector<int> myVec{ 1, 2, 5, 4,…

prices times weights

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 9 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 9 #include "std_lib_facilities.h" vector<double> price; vector<double> weight; class indexCalc…

name age pairs 1.0

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 7 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] //Philipp Siedler //Bjarne Stroustrup’s PP //Chapter 8 Exercise 7 #include "std_lib_facilities.h" vector<string> names; vector<int> ages; class NameAge { vector<string> n;…

reverse char sequence

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 6 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 6 #include "std_lib_facilities.h" vector<string> myVec{ "a","b","c","d","e","f","g","h","i","j" }; vector<string> myVecRev;…

reverse integer sequence

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 5 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 5 #include "std_lib_facilities.h" vector<int> myVec{ 0,1,2,3,4,5,6,7,8,9 }; vector<int> myVecRev;…