void setup() {
//
Serial.begin(115200);
int A = 150;
int B = 50;
// Output the testing for arithmetic operators
Serial.println("Testing for Arithmetic Operators");
Serial.println("A = " + String(A));
Serial.println("B = " + String(B));
Serial.println("A + B = " + String(A + B));
Serial.println("A - B = " + String(A - B));
Serial.println("A * B = " + String(A * B));
// Perform division only if B is not zero to avoid division by zero error
if (B != 0) {
float quotient = (float)A / B;
Serial.println("B / A = " + String(quotient, 2)); //
Serial.println("B % A = " + String(B % A)); //
} else {
Serial.println("B is zero, division and modulo operations are undefined.");
}
}
void loop() {
//
}