Combine the concepts! Build a `MathUtility` class containing a public `static const int pi = 3` (simplified PI) and a public static method `int multiply(int a, int b)`. In `main()`, read two integers, call the static method, and print ‘Product: [P]’ followed by ‘PI: [pi]’ on a new line.
Two space-separated integers.
Print the product and the static constant PI.
None
4 5
Product: 20
PI: 3
Utility classes often group pure logic and global constants using static members, meaning they never need to be instantiated to be used.
#include <iostream>
class MathUtility {
// Define static const pi and static multiply method
};
// Provide out-of-class definition for pi if needed (based on C++ standards)
int main() {
// Read input, call static method, print output
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used