#include <stdio.h>

class LED {
public:
    void turnOn() {
        printf("LED ON\n");
    }

    void turnOff() {
        printf("LED OFF\n");
    }
};

int main(void) {
    LED led;           // Create LED object
    led.turnOn();      // Call turnOn() method
    led.turnOff();     // Call turnOff() method
    return 0;
}
Upvote
Downvote
Loading...

Input

Expected Output

LED ON LED OFF