https://rentry.org/PPP2_p178 ⎗ ✓ 1 2 3 4 5 6 7 8 9 10 11 12 13 14// Code derived from Stroustrup's PPP2 book // § 6.3 Back to the calculator! // -and beginning on p 178 #include <iostream> using std::cout; int main() { cout << (2 + 2) << '\n'; // 4 cout << (2 + 2 * 3) << '\n'; // 8 cout << (2 + 3 - 25 / 5) << '\n'; // 0 } build & run: g++ -std=c++20 -O2 -Wall -pedantic ./ch_06/main_p178.cpp && ./a.out sauce: Bjarne Stroustrup's PPP2 textbook /robowaifu/'s official C++ learning textbook thread Prev • Up • Next